Patchwork [1/8] mtd: devices: elm: Remove unnecessary OOM messages

login
register
mail settings
Submitter Jingoo Han
Date Feb. 6, 2014, 6:08 a.m.
Message ID <000301cf2301$e987e310$bc97a930$%han@samsung.com>
Download mbox | patch
Permalink /patch/317356/
State Accepted
Commit 834fa8a56593044f98a0da68bc21d1a31d05124f
Headers show

Comments

Jingoo Han - Feb. 6, 2014, 6:08 a.m.
The site-specific OOM messages are unnecessary, because they
duplicate the MM subsystem generic OOM message.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/mtd/devices/elm.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
pekon gupta - Feb. 6, 2014, 6:27 a.m.
>From: Jingoo Han [mailto:jg1.han@samsung.com]
>
>The site-specific OOM messages are unnecessary, because they
>duplicate the MM subsystem generic OOM message.
>
>Signed-off-by: Jingoo Han <jg1.han@samsung.com>
>---
> drivers/mtd/devices/elm.c |    4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
>diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
>index d1dd6a3..437ed3a 100644
>--- a/drivers/mtd/devices/elm.c
>+++ b/drivers/mtd/devices/elm.c
>@@ -354,10 +354,8 @@ static int elm_probe(struct platform_device *pdev)
> 	struct elm_info *info;
>
> 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
>-	if (!info) {
>-		dev_err(&pdev->dev, "failed to allocate memory\n");
>+	if (!info)
> 		return -ENOMEM;
>-	}
>
> 	info->dev = &pdev->dev;
>
>--
>1.7.10.4
>
Acked-by: Pekon Gupta <pekon@ti.com>
+ avinashphilipk@gmail.com

with regards, pekon

Patch

diff --git a/drivers/mtd/devices/elm.c b/drivers/mtd/devices/elm.c
index d1dd6a3..437ed3a 100644
--- a/drivers/mtd/devices/elm.c
+++ b/drivers/mtd/devices/elm.c
@@ -354,10 +354,8 @@  static int elm_probe(struct platform_device *pdev)
 	struct elm_info *info;
 
 	info = devm_kzalloc(&pdev->dev, sizeof(*info), GFP_KERNEL);
-	if (!info) {
-		dev_err(&pdev->dev, "failed to allocate memory\n");
+	if (!info)
 		return -ENOMEM;
-	}
 
 	info->dev = &pdev->dev;