From: Markus Elfring Date: Wed, 28 Mar 2018 14:34:27 +0000 (+0200) Subject: video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_in... X-Git-Tag: v4.17-rc1~63^2~16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=b78f8ca82b5f3ee4bf6b3979624ef76fa3de7611;p=linux.git video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_init_fb() 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 Cc: Helge Deller Cc: "James E. J. Bottomley" Cc: Rolf Eike Beer Signed-off-by: Bartlomiej Zolnierkiewicz --- 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;