summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorAlex Elder2016-05-24 13:34:51 -0500
committerGreg Kroah-Hartman2016-05-27 11:28:16 -0700
commit95073cc2e53c1352f2c244408d1bd005b07650fd (patch)
treefd54de6f0354c10278974f684bca42da78808009 /tools/perf/scripts/python
parentd97fca12e92d3179554baf4db42611e5fe56aeed (diff)
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: Alex Elder <elder@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions