]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
iio: hmc5843: fix potential NULL pointer dereferences
authorKangjie Lu <kjlu@umn.edu>
Sat, 16 Mar 2019 22:08:33 +0000 (17:08 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit827d57d72a90200778141000a9d713fe91858c25
treeafc5c329378db0a427358acb6874a8a50c916717
parentaa664001d5b3f5572d6acdf30f0a6024d3e2a23c
iio: hmc5843: fix potential NULL pointer dereferences

BugLink: https://bugs.launchpad.net/bugs/1838700
[ Upstream commit 536cc27deade8f1ec3c1beefa60d5fbe0f6fcb28 ]

devm_regmap_init_i2c may fail and return NULL. The fix returns
the error when it fails.

Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/iio/magnetometer/hmc5843_i2c.c
drivers/iio/magnetometer/hmc5843_spi.c