Skip to content
Commit 95073cc2 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman
Browse files

greybus: use PTR_ERR_OR_ZERO()



Coccinelle points out that the macro PTR_ERR_OR_ZERO() handles the
frequent case of converting a pointer into either error code (if its
value is an encoded error value) or 0 (otherwise).  Switch some code
in gb_power_supply_register() to use that macro.  I have verified
this is true of the kernel we're now working with (arche-6.0).

Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent d97fca12
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment