diff options
author | Guenter Roeck <linux@roeck-us.net> | 2014-09-30 10:48:28 -0700 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2014-11-17 03:07:09 +0100 |
commit | ef288f9f656cdf46cb7788b6bb18da1c3b722feb (patch) | |
tree | df4ae56b7a2b2f33cec64198359a8bad76a5a390 /drivers/power | |
parent | 46c99ac66222aed719f26835eae4946d72880cbe (diff) |
power/reset: xgene: Return -ENOMEM if out of memory
It is customary to return an error code of -ENOMEM if the system
is out of memory. Also, in that case, the infrastructure will report
an error, so it is unnecessary to report it again.
Cc: Loc Ho <lho@apm.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/reset/xgene-reboot.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c index 6b49be6867ab..6ca4bf99bbdd 100644 --- a/drivers/power/reset/xgene-reboot.c +++ b/drivers/power/reset/xgene-reboot.c @@ -61,10 +61,8 @@ static int xgene_reboot_probe(struct platform_device *pdev) struct xgene_reboot_context *ctx; ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); - if (!ctx) { - dev_err(&pdev->dev, "out of memory for context\n"); - return -ENODEV; - } + if (!ctx) + return -ENOMEM; ctx->csr = of_iomap(pdev->dev.of_node, 0); if (!ctx->csr) { |