]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: charger-manager: simplify return statements
authorAndi Shyti <andi.shyti@gmail.com>
Wed, 29 Mar 2017 15:13:57 +0000 (00:13 +0900)
committerSebastian Reichel <sre@kernel.org>
Thu, 13 Apr 2017 23:41:34 +0000 (01:41 +0200)
commit82fa46362bd5d648f0e8e87437bae12e3db2db73
tree40d12952a8033c9c06a599ce6395fd16b1a65fc0
parent36eb52be9015c7714b09d91c703df13d554e2bad
power: supply: charger-manager: simplify return statements

Some trivial improvements on the returning value of the
functions:

 - remove unnecessary goto labels that just return, return
   immediately, instead.

 - do not initialize when not needed.

 - return the value from the calling function that fails instead
   of politically choosing -EINVAL.

Signed-off-by: Andi Shyti <andi@etezian.org>
Signed-off-by: Sebastian Reichel <sre@kernel.org>
drivers/power/supply/charger-manager.c