drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Fri, 3 Sep 2021 16:47:37 +0000 (17:47 +0100)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Tue, 14 Sep 2021 12:04:20 +0000 (13:04 +0100)
commit9dd2e4dddc247df4154a2161efb71e12ce20961a
tree64e24cb0d537f1710bfcb0277f5af5147c3e9290
parenta2b8b34d78d9721196b0010b00d0db5f4392aa5b
drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised

If a call to rpi_touchscreen_i2c_write from rpi_touchscreen_probe
fails before mipi_dsi_device_register_full is called, then
in trying to log the error message if uses ts->dsi->dev when
it is still NULL.

Use ts->i2c->dev instead, which is initialised earlier in probe.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/panel/panel-raspberrypi-touchscreen.c