[media] cxd2820r: fix gpio null pointer dereference
authorAntti Palosaari <crope@iki.fi>
Mon, 16 Jan 2017 21:27:41 +0000 (19:27 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 31 Jan 2017 10:45:41 +0000 (08:45 -0200)
commit0ffb94b6cc5df6376ab6bff5b80075641f6716f8
tree3564598db7c115c305ca4e1aa6b58f2f2b510bbd
parentd40e98c13b3e7cb1aa16e9c14f35db3c8c3dd033
[media] cxd2820r: fix gpio null pointer dereference

Setting GPIOs during probe causes null pointer deference when
GPIOLIB was not selected by Kconfig. Initialize driver private
field before calling set gpios.

It is regressing bug since 4.9.

Fixes: 07fdf7d9f19f ("[media] cxd2820r: add I2C driver bindings")

Reported-by: Chris Rankin <rankincj@gmail.com>
Tested-by: Chris Rankin <rankincj@gmail.com>
Tested-by: Håkan Lennestål <hakan.lennestal@gmail.com>
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/dvb-frontends/cxd2820r_core.c