]> git.baikalelectronics.ru Git - kernel.git/commit
mfd: tps6105x: Fix possible NULL pointer access
authorGrigoryev Denis <grigoryev@fastwel.ru>
Fri, 25 Sep 2015 16:57:09 +0000 (16:57 +0000)
committerLee Jones <lee.jones@linaro.org>
Fri, 30 Oct 2015 17:19:40 +0000 (17:19 +0000)
commit4b072f1bcf7b7d7c2a0d107c3b08f6f0008d9cd1
tree20b0cb28646a076665321cea0aff6e1c67d99202
parent9e3b93b85c8d3c791cbef8a1f1d778da8fc54f04
mfd: tps6105x: Fix possible NULL pointer access

tps6105 driver provides two cells. One is for GPIO and another one is
for selected mode depending on platform data. When tps6105x is used in
GPIO-only mode, this driver calls mfd_add_devices() with mfd_cell
.name == NULL. This value causes an oops in platform_device_register()
later.

The following patch adds a mfd_cell for each possible mode thereby
excluding .name assignment in runtime.

Signed-off-by: Denis Grigoryev <grigoryev@fastwel.ru>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/tps6105x.c