Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 60a1f6e4 authored by Ramakrishna Pallala's avatar Ramakrishna Pallala Committed by Anton Vorontsov
Browse files

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: default avatarRamakrishna Pallala <ramakrishna.pallala@intel.com>
Acked-by: default avatarMyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: default avatarAnton Vorontsov <cbouatmailru@gmail.com>
parent 86e6c6bd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment