diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2018-04-26 06:24:18 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2018-04-26 06:24:18 -0400 |
commit | e281018b0b2562d8b82e6aa7c8647dfb2e4c1b29 (patch) | |
tree | 9be05610d5674d5fc6c05ed0c1aaf8cfd4a923a2 | |
parent | bdb488e65352daca4dbab37df99f605754cfcdd8 (diff) |
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>
-rw-r--r-- | drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 |
1 files changed, 2 insertions, 6 deletions
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) | |||
2149 | if (info->fbdefio) { | 2149 | if (info->fbdefio) { |
2150 | ch->sglist = vmalloc(sizeof(struct scatterlist) * | 2150 | ch->sglist = vmalloc(sizeof(struct scatterlist) * |
2151 | ch->fb_size >> PAGE_SHIFT); | 2151 | ch->fb_size >> PAGE_SHIFT); |
2152 | if (!ch->sglist) { | 2152 | if (!ch->sglist) |
2153 | dev_err(ch->lcdc->dev, "cannot allocate sglist\n"); | ||
2154 | return -ENOMEM; | 2153 | return -ENOMEM; |
2155 | } | ||
2156 | } | 2154 | } |
2157 | 2155 | ||
2158 | info->bl_dev = ch->bl; | 2156 | info->bl_dev = ch->bl; |
@@ -2716,10 +2714,8 @@ static int sh_mobile_lcdc_probe(struct platform_device *pdev) | |||
2716 | } | 2714 | } |
2717 | 2715 | ||
2718 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); | 2716 | priv = kzalloc(sizeof(*priv), GFP_KERNEL); |
2719 | if (!priv) { | 2717 | if (!priv) |
2720 | dev_err(&pdev->dev, "cannot allocate device data\n"); | ||
2721 | return -ENOMEM; | 2718 | return -ENOMEM; |
2722 | } | ||
2723 | 2719 | ||
2724 | priv->dev = &pdev->dev; | 2720 | priv->dev = &pdev->dev; |
2725 | priv->meram_dev = pdata->meram_dev; | 2721 | priv->meram_dev = pdata->meram_dev; |