Thread (8 messages) 8 messages, 3 authors, 2018-03-28

[PATCH v2 2/2] video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_in

flat view
STALE3115d

From: SF Markus Elfring <hidden>
Date: 2018-01-07 11:59:37
Also in: dri-devel, kernel-janitors, lkml
Subsystem: framebuffer layer, parisc architecture, the rest · Maintainers: Helge Deller, "James E.J. Bottomley", Linus Torvalds

From: Markus Elfring <redacted>
Date: Sun, 7 Jan 2018 12:34:22 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <redacted>
---

v2:
This update suggestion was rebased on source files from the software
"Linux next-20180105" together with a change for an error code.

 drivers/video/fbdev/stifb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/stifb.c b/drivers/video/fbdev/stifb.c
index 511a594889af..dec8efb4f256 100644
--- a/drivers/video/fbdev/stifb.c
+++ b/drivers/video/fbdev/stifb.c
@@ -1126,10 +1126,8 @@ static int __init stifb_init_fb(struct sti_struct *sti, int bpp_pref)
 	int bpp, xres, yres;
 
 	fb = kzalloc(sizeof(*fb), GFP_ATOMIC);
-	if (!fb) {
-		printk(KERN_ERR "stifb: Could not allocate stifb structure\n");
+	if (!fb)
 		return -ENOMEM;
-	}
 	
 	info = &fb->info;
 
-- 
2.15.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help