summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus
diff options
context:
space:
mode:
authorEva Rachel Retuya <eraretuya@gmail.com>2016-09-21 13:07:04 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-22 11:54:47 +0200
commit5a420d15d15b0eb46672578baa268675c63962f7 (patch)
tree00b984ac139998e4a54134ce567bc5e89adcae5e /drivers/staging/greybus
parent4f1cbe2a7b4fa50e5ae09e0a564c9dc4101b02fd (diff)
downloadlinux-5a420d15d15b0eb46672578baa268675c63962f7.tar.bz2
staging: greybus: arche-platform: compress return logic into one line
Modify return statement to use the value being returned directly instead of assigning it first to 'ret' and returning this variable. Coccinelle semantic patch used: @@ expression e; local idexpression ret; @@ -ret = +return e; -return ret; Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/greybus')
-rw-r--r--drivers/staging/greybus/arche-platform.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index 9d9048e6aed3..d6b36099d8ea 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -634,8 +634,7 @@ static int arche_platform_probe(struct platform_device *pdev)
arche_pdata->wake_detect_gpio = of_get_named_gpio(np, "svc,wake-detect-gpio", 0);
if (arche_pdata->wake_detect_gpio < 0) {
dev_err(dev, "failed to get wake detect gpio\n");
- ret = arche_pdata->wake_detect_gpio;
- return ret;
+ return arche_pdata->wake_detect_gpio;
}
ret = devm_gpio_request(dev, arche_pdata->wake_detect_gpio, "wake detect");