[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2822261.bmyft01XjZ@phil>
Date: Fri, 16 May 2014 15:14:20 +0200
From: Heiko Stübner <heiko@...ech.de>
To: Dmitry Eremin-Solenikov <dbaryshkov@...il.com>,
David Woodhouse <dwmw2@...radead.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] power: generic-adc-battery: return meaningful error when no channel available
From: Heiko Stuebner <heiko.stuebner@...com>
When no channel was found the driver currently always returns -ENODEV. This
hides the actual error which is available in ret from the kernel and disables
for example -EPROBE_DEFER handling.
Signed-off-by: Heiko Stuebner <heiko.stuebner@...com>
---
drivers/power/generic-adc-battery.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
index 540d57f..02f434b 100644
--- a/drivers/power/generic-adc-battery.c
+++ b/drivers/power/generic-adc-battery.c
@@ -297,10 +297,8 @@ static int gab_probe(struct platform_device *pdev)
}
/* none of the channels are supported so let's bail out */
- if (index == 0) {
- ret = -ENODEV;
+ if (index == 0)
return ret;
- }
/*
* Total number of properties is equal to static properties
--
1.9.0
--
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