mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 02:50:49 +09:00
power: supply: sc8551: Handling data out-of-bounds in Code
Change-Id: I3a2671b5dc2976d1dc030a21734cb425a72edad1 Signed-off-by: Shengfei Xu <xsf@rock-chips.com>
This commit is contained in:
@@ -1191,7 +1191,7 @@ static int sc8551_set_adc_scanrate(struct sc8551 *sc, bool oneshot)
|
||||
static int sc8551_get_adc_data(struct sc8551 *sc, int channel, int *result)
|
||||
{
|
||||
u8 val_l = 0, val_h = 0;
|
||||
u16 val = 0;
|
||||
u32 val = 0;
|
||||
int ret = 0;
|
||||
|
||||
if (channel >= ADC_MAX_NUM)
|
||||
|
||||
Reference in New Issue
Block a user