[PATCH] video: sh_mobile_lcdcfb: Delete an error message for a failed memory allocation in two functions

Subsystems: framebuffer layer, the rest

STALE3024d

2 messages, 2 authors, 2018-04-26 · open the first message on its own page

[PATCH] video: sh_mobile_lcdcfb: Delete an error message for a failed memory allocation in two functions

From: SF Markus Elfring <hidden>
Date: 2017-11-26 13:00:42

From: Markus Elfring <redacted>
Date: Sun, 26 Nov 2017 13:48:55 +0100

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 <redacted>
---
 drivers/video/fbdev/sh_mobile_lcdcfb.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index c3a46506e47e..0f9b37034eaf 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;
@@ -2718,10 +2716,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;
-- 
2.15.0

Re: [PATCH] video: sh_mobile_lcdcfb: Delete an error message for a failed memory allocation in two functions

From: Bartlomiej Zolnierkiewicz <hidden>
Date: 2018-04-26 09:55:59

On Sunday, November 26, 2017 02:00:16 PM SF Markus Elfring wrote:
From: Markus Elfring <redacted>
Date: Sun, 26 Nov 2017 13:48:55 +0100

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 <redacted>
I've done requested audit regarding multiple fb devices support
myself now and it is okay to apply this patch.

Patch queued for 4.18, thanks.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help