From: Chris Lapa Date: Fri, 24 Jun 2016 02:26:11 +0000 (+1000) Subject: max8903: remove unnecessary 'out of memory' error message. X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e6518a43253944108832764656283a818949c75f;p=linux-beck.git max8903: remove unnecessary 'out of memory' error message. Remove the 'out of memory' error message as it is printed by the core. Signed-off-by: Chris Lapa Reviewed-by: Krzysztof Kozlowski Signed-off-by: Sebastian Reichel --- diff --git a/drivers/power/max8903_charger.c b/drivers/power/max8903_charger.c index 643a87aac60f..9453bbff6075 100644 --- a/drivers/power/max8903_charger.c +++ b/drivers/power/max8903_charger.c @@ -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;