Commit 7691bf02 authored by Dave Stevenson's avatar Dave Stevenson Committed by Greg Kroah-Hartman
Browse files

UPSTREAM: drm/panel/raspberrypi-touchscreen: Avoid NULL deref if not initialised



[ Upstream commit f92055ae ]

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.

Fixes: 2f733d61 ("drm/panel: Add support for the Raspberry Pi 7" Touchscreen.")
Signed-off-by: default avatarDave Stevenson <dave.stevenson@raspberrypi.com>
Signed-off-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220415162513.42190-2-stefan.wahren@i2se.com


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
(cherry picked from commit 4f08e85c)
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: Iafda0a578608d0f3d106bcdcd07d37fb1db6fd23
parent 382ef1db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment