video/fbdev/stifb: Delete an error message for a failed memory allocation in stifb_in...
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 28 Mar 2018 14:34:27 +0000 (16:34 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Wed, 28 Mar 2018 14:34:27 +0000 (16:34 +0200)
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>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E. J. Bottomley" <jejb@parisc-linux.org>
Cc: Rolf Eike Beer <eike-kernel@sf-tec.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/stifb.c

index 511a594..dec8efb 100644 (file)
@@ -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;