summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/arche-platform.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2016-01-11 11:29:07 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-11 15:58:01 -0800
commitf1f251b59b6db97c42d7d746727072cb37604494 (patch)
tree0dd0a8862925700cb70a5edd5767f795834a501b /drivers/staging/greybus/arche-platform.c
parent140741ec6384435b1a0f89042a2a6dac8e2eebd2 (diff)
greybus: arche-platform: propagate errors returned by gpiolib
Propagate errors returned by of_get_named_gpio() instead of sending -ENODEV. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Vaibhav Hiremath <vaibhav.hiremath@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/arche-platform.c')
-rw-r--r--drivers/staging/greybus/arche-platform.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 93ecd8c8bed7..52c79ae792f4 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -82,7 +82,7 @@ static int arche_platform_probe(struct platform_device *pdev)
arche_pdata->svc_reset_gpio = of_get_named_gpio(np, "svc,reset-gpio", 0);
if (arche_pdata->svc_reset_gpio < 0) {
dev_err(dev, "failed to get reset-gpio\n");
- return -ENODEV;
+ return arche_pdata->svc_reset_gpio;
}
ret = devm_gpio_request(dev, arche_pdata->svc_reset_gpio, "svc-reset");
if (ret) {
@@ -100,7 +100,7 @@ static int arche_platform_probe(struct platform_device *pdev)
"svc,sysboot-gpio", 0);
if (arche_pdata->svc_sysboot_gpio < 0) {
dev_err(dev, "failed to get sysboot gpio\n");
- return -ENODEV;
+ return arche_pdata->svc_sysboot_gpio;
}
ret = devm_gpio_request(dev, arche_pdata->svc_sysboot_gpio, "sysboot0");
if (ret) {
@@ -118,7 +118,7 @@ static int arche_platform_probe(struct platform_device *pdev)
"svc,refclk-req-gpio", 0);
if (arche_pdata->svc_refclk_req < 0) {
dev_err(dev, "failed to get svc clock-req gpio\n");
- return -ENODEV;
+ return arche_pdata->svc_refclk_req;
}
ret = devm_gpio_request(dev, arche_pdata->svc_refclk_req, "svc-clk-req");
if (ret) {