]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: ucb1x00-core: Rewrite ucb1x00_add_dev()
authorLee Jones <lee.jones@linaro.org>
Fri, 19 Jul 2013 13:19:58 +0000 (14:19 +0100)
committerLee Jones <lee.jones@linaro.org>
Mon, 2 Sep 2013 09:22:46 +0000 (10:22 +0100)
commit5fbfbd8e342f04840b8dbdd62804045c77aafddf
treecb00fb213948d9e5df867dffa4543b2b8cd573f3
parent56db79e77e37175b1ba3d4ee69125d5940080a84
mfd: ucb1x00-core: Rewrite ucb1x00_add_dev()

Error handling is on-its-head in this function. After invoking a function we
should examine the return code and return the error value if there was one.
Instead, this function checks for success and goes onto provide functionality
if success was received. Not so bad in a simple function like this, but in
a more complex one this could end up drowning in curly brackets.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/ucb1x00-core.c