hwmon: ina219: Fix error case return values
authorSami Liedes <sliedes@nvidia.com>
Tue, 5 Feb 2013 13:52:06 +0000 (15:52 +0200)
committerDan Willemsen <dwillemsen@nvidia.com>
Sat, 14 Sep 2013 19:56:55 +0000 (12:56 -0700)
commit9dafe9216335cda950f215bdd4f41341b94e6a50
tree25d61c321f40372c3c5f9557eae998fba5ccadee
parentd1dca5a6cadb40be279605f1bcce0144ef142ecb
hwmon: ina219: Fix error case return values

In both show_power() and show_current(), an error case can cause the
value of `retval' to be returned without the variable having ever been
initialized.

Fix the error cases to return -EAGAIN.

Change-Id: I929097028ba861267a69e32d963fb225310a0ecd
Signed-off-by: Sami Liedes <sliedes@nvidia.com>
Reviewed-on: http://git-master/r/197474
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Anshul Jain (SW) <anshulj@nvidia.com>
Reviewed-by: Juha Tukkinen <jtukkinen@nvidia.com>
drivers/hwmon/ina219.c