# \[PATCH\] video: sh\_mobile\_meram: Delete an error message for a failed memory allocation in sh\_mobile\_meram\_probe()

- Subsystems: FRAMEBUFFER LAYER, THE REST
- Maintainers: Helge Deller, Linus Torvalds
- List: linux-fbdev
- 2 messages, 2 authors
- Page: https://ratatoskr.run/linux-fbdev/2017/11/5140663/t

## \[PATCH\] video: sh\_mobile\_meram: Delete an error message for a failed memory allocation in sh\_mobile\_meram\_probe()

- From: SF Markus Elfring \<hidden\>
- Date: 2017-11-26 12:19:33 
- Message: https://ratatoskr.run/linux-fbdev/2017/11/5140663.md

```text
From: Markus Elfring <redacted>
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.

Signed-off-by: Markus Elfring <redacted>
---
 drivers/video/fbdev/sh_mobile_meram.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/video/fbdev/sh_mobile_meram.c b/drivers/video/fbdev/sh_mobile_meram.c
index baadfb207b2e..b5a6735aeb87 100644
--- a/drivers/video/fbdev/sh_mobile_meram.c
+++ b/drivers/video/fbdev/sh_mobile_meram.c
@@ -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);
-- 
2.15.0

```

## Re: \[PATCH\] video: sh\_mobile\_meram: Delete an error message for a failed memory allocation in sh\_mobile\_meram\_probe()

- From: Bartlomiej Zolnierkiewicz \<hidden\>
- Date: 2018-04-26 09:57:15 
- Message: https://ratatoskr.run/linux-fbdev/2018/04/5269250.md

```text
On Sunday, November 26, 2017 01:19:17 PM SF Markus Elfring wrote:
> From: Markus Elfring <redacted>
> 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.
> 
> 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

```
