diff mbox

[03/16] i2c: efm32: remove unnecessary OOM messages

Message ID 018701cf69ab$42fd89f0$c8f89dd0$%han@samsung.com
State Superseded
Headers show

Commit Message

Jingoo Han May 7, 2014, 4:17 a.m. UTC
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/i2c/busses/i2c-efm32.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Uwe Kleine-König May 7, 2014, 7:32 a.m. UTC | #1
Hello,

On Wed, May 07, 2014 at 01:17:30PM +0900, Jingoo Han wrote:
> 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/i2c/busses/i2c-efm32.c |    4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
> index 777ed40..f7eccd6 100644
> --- a/drivers/i2c/busses/i2c-efm32.c
> +++ b/drivers/i2c/busses/i2c-efm32.c
> @@ -320,10 +320,8 @@ static int efm32_i2c_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  
>  	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
> -	if (!ddata) {
> -		dev_dbg(&pdev->dev, "failed to allocate private data\n");
> +	if (!ddata)
>  		return -ENOMEM;
> -	}
I don't have a strong feeling here, but given that this is only dev_dbg
(i.e. the message doesn't appear without further intervention) the
expected effect is "only" saving some bytes.

If you still feel this patch is worth to have, you can add my Ack.

Best regards
Uwe
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-efm32.c b/drivers/i2c/busses/i2c-efm32.c
index 777ed40..f7eccd6 100644
--- a/drivers/i2c/busses/i2c-efm32.c
+++ b/drivers/i2c/busses/i2c-efm32.c
@@ -320,10 +320,8 @@  static int efm32_i2c_probe(struct platform_device *pdev)
 		return -EINVAL;
 
 	ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
-	if (!ddata) {
-		dev_dbg(&pdev->dev, "failed to allocate private data\n");
+	if (!ddata)
 		return -ENOMEM;
-	}
 	platform_set_drvdata(pdev, ddata);
 
 	init_completion(&ddata->done);