power-supply: Avoid unnecessary 'goto' statements
authorViresh Kumar <viresh.kumar@linaro.org>
Thu, 4 Sep 2014 12:01:35 +0000 (17:31 +0530)
committerSebastian Reichel <sre@kernel.org>
Tue, 16 Sep 2014 09:01:37 +0000 (11:01 +0200)
commit464069cae95f71ba670c7e3a90d919b18fb48d66
treed7f57742c9af811a0bcc593697b7c9b026f37dd5
parent73b4a087ba4c0d0d52519769320fa684185c563e
power-supply: Avoid unnecessary 'goto' statements

Using 'goto' statements for freeing resources on failures is a good choice as it
makes code very clean, and reduces the chances of human errors.

Though in most cases compiler may take care of this. But adding unnecessary
'goto' statements wouldn't make anything better. Code becomes less readable
actually.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/power_supply_core.c
drivers/power/power_supply_leds.c
This page took 0.026178 seconds and 5 git commands to generate.