Skip to content
Commit 8a7b1797 authored by Martin Blumenstingl's avatar Martin Blumenstingl Committed by Linus Walleij
Browse files

gpio: stp-xway: simplify error handling in xway_stp_probe()



Return early if devm_gpiochip_add_data() returns an error instead of
having two consecutive "if (!ret) ..." statements.

Also make xway_stp_hw_init() return void because it unconditionally
returns 0. While here also update the kerneldoc comment for
xway_stp_hw_init().

These changes makes the error handling within the driver consistent.
No functional changes intended.

Signed-off-by: default avatarMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20190702223248.31934-2-martin.blumenstingl@googlemail.com


Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 827a9b8b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment