[PATCH AUTOSEL for 4.9 129/190] power: supply: isp1704: Fix unchecked return value of devm_kzalloc

2018-03-07 Thread Sasha Levin
From: Pan Bian [ Upstream commit 8b20839988f1ed5e534b270f3776709b640dc7e0 ] Function devm_kzalloc() will return a NULL pointer. However, in function isp1704_charger_probe(), the return value of devm_kzalloc() is directly used without validation. This may result in a bad

[PATCH AUTOSEL for 4.9 129/190] power: supply: isp1704: Fix unchecked return value of devm_kzalloc

2018-03-07 Thread Sasha Levin
From: Pan Bian [ Upstream commit 8b20839988f1ed5e534b270f3776709b640dc7e0 ] Function devm_kzalloc() will return a NULL pointer. However, in function isp1704_charger_probe(), the return value of devm_kzalloc() is directly used without validation. This may result in a bad memory access bug.