[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1411779438-23127-3-git-send-email-linux@roeck-us.net>
Date: Fri, 26 Sep 2014 17:57:10 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Sebastian Reichel <sre@...nel.org>
Cc: linux-pm@...r.kernel.org,
Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>,
Santosh Shilimkar <santosh.shilimkar@...com>,
linux-kernel@...r.kernel.org, Guenter Roeck <linux@...ck-us.net>,
Loc Ho <lho@....com>
Subject: [PATCH 02/10] 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@....com>
Signed-off-by: Guenter Roeck <linux@...ck-us.net>
---
drivers/power/reset/xgene-reboot.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/power/reset/xgene-reboot.c b/drivers/power/reset/xgene-reboot.c
index ecd55f8..20cf7c3 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) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists