Commit e281018b authored by Markus Elfring's avatar Markus Elfring Committed by Bartlomiej Zolnierkiewicz

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: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Cc: Arvind Yadav <arvind.yadav.cs@gmail.com>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Kees Cook <keescook@chromium.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent bdb488e6
...@@ -2149,11 +2149,9 @@ sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch) ...@@ -2149,11 +2149,9 @@ sh_mobile_lcdc_channel_fb_register(struct sh_mobile_lcdc_chan *ch)
if (info->fbdefio) { if (info->fbdefio) {
ch->sglist = vmalloc(sizeof(struct scatterlist) * ch->sglist = vmalloc(sizeof(struct scatterlist) *
ch->fb_size >> PAGE_SHIFT); ch->fb_size >> PAGE_SHIFT);
if (!ch->sglist) { if (!ch->sglist)
dev_err(ch->lcdc->dev, "cannot allocate sglist\n");
return -ENOMEM; return -ENOMEM;
} }
}
info->bl_dev = ch->bl; info->bl_dev = ch->bl;
...@@ -2716,10 +2714,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) ...@@ -2716,10 +2714,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev)
} }
priv = kzalloc(sizeof(*priv), GFP_KERNEL); priv = kzalloc(sizeof(*priv), GFP_KERNEL);
if (!priv) { if (!priv)
dev_err(&pdev->dev, "cannot allocate device data\n");
return -ENOMEM; return -ENOMEM;
}
priv->dev = &pdev->dev; priv->dev = &pdev->dev;
priv->meram_dev = pdata->meram_dev; priv->meram_dev = pdata->meram_dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment