power-supply: Check for failures only when we can fail
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Sep 2014 12:01:34 +0000 (17:31 +0530)
committerSebastian Reichel <sre@kernel.org>
Tue, 16 Sep 2014 09:01:37 +0000 (11:01 +0200)
In power_supply_show_property() routine, we call ->get_property() conditionally
and should check for failure in that case only. There is no point comparing
'ret' for errors when 'ret' is surely zero.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>

No differences found