From e281018b0b2562d8b82e6aa7c8647dfb2e4c1b29 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Thu, 26 Apr 2018 12:24:18 +0200 Subject: video: sh_mobile_lcdcfb: Delete an error message for a failed memory allocation in two functions Omit an extra message for a memory allocation failure in these functions. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Cc: Arvind Yadav Cc: Geert Uytterhoeven Cc: Kees Cook Cc: Wei Yongjun Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'drivers/video') diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 86bd4090b011..929b1c51aab6 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -2149,10 +2149,8 @@ sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) if (info->fbdefio) { ch->sglist = vmalloc(sizeof(struct scatterlist) * ch->fb_size >> PAGE_SHIFT); - if (!ch->sglist) { - dev_err(ch->lcdc->dev, "cannot allocate sglist\n"); + if (!ch->sglist) return -ENOMEM; - } } info->bl_dev = ch->bl; @@ -2716,10 +2714,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) } priv = kzalloc(sizeof(*priv), GFP_KERNEL); - if (!priv) { - dev_err(&pdev->dev, "cannot allocate device data\n"); + if (!priv) return -ENOMEM; - } priv->dev = &pdev->dev; priv->meram_dev = pdata->meram_dev; -- cgit