diff options
author | Chris Lapa <chris@lapa.com.au> | 2016-06-24 12:26:11 +1000 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2016-06-28 20:05:41 +0200 |
commit | e6518a43253944108832764656283a818949c75f (patch) | |
tree | fb4845c210febd5d5fc9741685c35eb57b35c248 | |
parent | 3525e5c5b3dea03ff999c53be6392819165df820 (diff) |
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 <chris@lapa.com.au>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
-rw-r--r-- | drivers/power/max8903_charger.c | 4 |
1 files changed, 1 insertions, 3 deletions
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; |