From: Markus Elfring Date: Wed, 28 Mar 2018 14:34:29 +0000 (+0200) Subject: video/console/sticore: Delete an error message for a failed memory allocation in... X-Git-Tag: v4.17-rc1~63^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3af04d5c459485ce3f4e18c6331515092ca85be4;p=thirdparty%2Flinux.git video/console/sticore: Delete an error message for a failed memory allocation in sti_try_rom_generic() 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" Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/video/console/sticore.c b/drivers/video/console/sticore.c index d1d3796773aa2..08b822656846c 100644 --- a/drivers/video/console/sticore.c +++ b/drivers/video/console/sticore.c @@ -827,10 +827,8 @@ static struct sti_struct *sti_try_rom_generic(unsigned long address, } sti = kzalloc(sizeof(*sti), GFP_KERNEL); - if (!sti) { - printk(KERN_ERR "Not enough memory !\n"); + if (!sti) return NULL; - } spin_lock_init(&sti->lock);