Skip to contentSkip to conversation

video: sh_mobile_meram: Delete an error message for a failed memory allocation in sh_mobile_meram_probe()

PATCH In review SF Markus Elfring 2 participants 2 messages Nov 26, 2017 – Apr 26, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 video: sh_mobile_meram: Delete an error message for a failed memory allocation in sh_mobile_meram_probe()

From: Markus Elfring <[email protected]>
Date: Sun, 26 Nov 2017 13:08:43 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

---
 drivers/video/fbdev/sh_mobile_meram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/video/fbdev/sh_mobile_meram.c +1 -3
index baadfb207b2e..b5a6735aeb87 100644
@@ -644,10 +644,8 @@ static int sh_mobile_meram_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;
-	}
 
 	/* Initialize private data. */
 	mutex_init(&priv->lock);
Signature · 1 line
2.15.0
#1 lore raw
Quoted 8 lines · SF Markus Elfring

From: Markus Elfring <[email protected]>
Date: Sun, 26 Nov 2017 13:08:43 +0100

Omit an extra message for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.

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