Message ID | f92f41b1-d4fa-4ffa-8c19-af4eb0d2d8cf@users.sourceforge.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sunday, January 07, 2018 12:58:47 PM SF Markus Elfring wrote: > From: Markus Elfring <elfring@users.sourceforge.net> > 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 <elfring@users.sourceforge.net> Patch queued for 4.17, thanks. Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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;