mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-22 04:03:58 +08:00
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 <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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
bdb488e653
commit
e281018b0b
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user