max17042_battery: Fix error handling
authorRamakrishna Pallala <ramakrishna.pallala@intel.com>
Sat, 26 Nov 2011 00:11:15 +0000 (04:11 +0400)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Sat, 26 Nov 2011 00:11:15 +0000 (04:11 +0400)
In max17042_get_property(...), the values returned by
max17042_read_reg are directly assigned to the variables,
even if the read results in an error.

This patch checks for the return code from max17042_read_reg and
exits the function if there is any error.

Signed-off-by: Ramakrishna Pallala <ramakrishna.pallala@intel.com>
Acked-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>

No differences found