drivers: adc: Prevent overflow in max1125x_read_sample
Fix potential integer overflow caused by unsafe shift when computing
ADC mid-scale offset. Applies resolution bounds and uses unsigned
shift to avoid undefined behavior.
Fixes: CID 487740
Signed-off-by:
Sudarsan N <sudarsansamy2002@gmail.com>
Loading
Please sign in to comment