]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mfd: intel_soc_pmic_core: Fix unchecked return value
authorPan Bian <bianpan2016@163.com>
Sun, 23 Apr 2017 12:29:24 +0000 (20:29 +0800)
committerLee Jones <lee.jones@linaro.org>
Thu, 27 Apr 2017 10:54:47 +0000 (11:54 +0100)
commitdb43b8d04d7a9fa0ac18db6de2c4741dcefbcc0b
tree504f821a38accd78c5853d95ecde08e432e740c2
parentd1f4f01a994b13e7cc3d682b816de7fc7e3463d9
mfd: intel_soc_pmic_core: Fix unchecked return value

unction devm_regmap_init_i2c() returns an ERR_PTR on errors, and its
return value should be checked before it is dereferenced. However, in
function intel_soc_pmic_i2c_probe(), the return value of function
devm_regmap_init_i2c() is used without validation. This patch fixes it.

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/intel_soc_pmic_core.c