Commit 5a420d15 authored by Eva Rachel Retuya's avatar Eva Rachel Retuya Committed by Greg Kroah-Hartman

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: default avatarEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4f1cbe2a
...@@ -634,8 +634,7 @@ static int arche_platform_probe(struct platform_device *pdev) ...@@ -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); arche_pdata->wake_detect_gpio = of_get_named_gpio(np, "svc,wake-detect-gpio", 0);
if (arche_pdata->wake_detect_gpio < 0) { if (arche_pdata->wake_detect_gpio < 0) {
dev_err(dev, "failed to get wake detect gpio\n"); dev_err(dev, "failed to get wake detect gpio\n");
ret = arche_pdata->wake_detect_gpio; return arche_pdata->wake_detect_gpio;
return ret;
} }
ret = devm_gpio_request(dev, arche_pdata->wake_detect_gpio, "wake detect"); ret = devm_gpio_request(dev, arche_pdata->wake_detect_gpio, "wake detect");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment