commit | 60a1f6e4462bb71b39543ddbca314886a55adb9d | [log] [tgz] |
---|---|---|
author | Ramakrishna Pallala <ramakrishna.pallala@intel.com> | Sat Nov 26 04:11:15 2011 +0400 |
committer | Anton Vorontsov <cbouatmailru@gmail.com> | Sat Nov 26 04:11:15 2011 +0400 |
tree | b7e8216b6c35c8fa4423d33cb928666a2f11e371 | |
parent | 86e6c6bd9b70260fc5bc9fdfa2e5b4dfd8fe545c [diff] |
max17042_battery: Fix error handling 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>