]> git.karo-electronics.de Git - linux-beck.git/commitdiff
max8903: remove unnecessary 'out of memory' error message.
authorChris Lapa <chris@lapa.com.au>
Fri, 24 Jun 2016 02:26:11 +0000 (12:26 +1000)
committerSebastian Reichel <sre@kernel.org>
Tue, 28 Jun 2016 18:05:41 +0000 (20:05 +0200)
Remove the 'out of memory' error message as it is printed by the core.

Signed-off-by: Chris Lapa <chris@lapa.com.au>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/max8903_charger.c

index 643a87aac60f7f5bcc778d8fd7e320a6d42edc35..9453bbff6075dd23b88e5aa8918f800634bdef52 100644 (file)
@@ -304,10 +304,8 @@ static int max8903_probe(struct platform_device *pdev)
        }
 
        data = devm_kzalloc(dev, sizeof(struct max8903_data), GFP_KERNEL);
-       if (data == NULL) {
-               dev_err(dev, "Cannot allocate memory.\n");
+       if (!data)
                return -ENOMEM;
-       }
 
        data->pdata = pdev->dev.platform_data;
        data->dev = dev;