Skip to content
Commit b2c460f2 authored by Lukasz Madej's avatar Lukasz Madej Committed by Anas Nashif
Browse files

drivers: charger: charger_max20335: fix linear range usage



Fix validation of `linear_range_get_index()` results.
The function can resturn both 0 or -ERANGE but -EINVAL is never
returned. Use comparison against 0 to make the validation robust.

Use valid maximum index for the linear range. The 0x0C is reserved
value and should not be used. Therefore replace it with 0x0B.

Signed-off-by: default avatarLukasz Madej <l.madej@grinn-global.com>
parent 82169bba
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment