diff options
author | Marek Vasut <marex@denx.de> | 2024-05-31 22:33:12 +0200 |
---|---|---|
committer | Robert Foss <rfoss@kernel.org> | 2024-06-10 16:21:34 +0200 |
commit | 162e48cb1d84c2c966b649b8ac5c9d4f75f6d44f (patch) | |
tree | 1887955730e3e7d70adb1e7a2a97215a014b3a3a /drivers/gpu/drm/bridge/tc358767.c | |
parent | 004370a82ae1f5a0fd5abc1077733f9b1a42e7c0 (diff) |
drm/bridge: tc358767: Check if fully initialized before signalling HPD event via IRQ
Make sure the connector is fully initialized before signalling any
HPD events via drm_kms_helper_hotplug_event(), otherwise this may
lead to NULL pointer dereference.
Signed-off-by: Marek Vasut <marex@denx.de>
Reviewed-by: Robert Foss <rfoss@kernel.org>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240531203333.277476-1-marex@denx.de
Diffstat (limited to 'drivers/gpu/drm/bridge/tc358767.c')
-rw-r--r-- | drivers/gpu/drm/bridge/tc358767.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 32409f4aef6b..87c7346d037e 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -2152,7 +2152,7 @@ static irqreturn_t tc_irq_handler(int irq, void *arg) dev_err(tc->dev, "syserr %x\n", stat); } - if (tc->hpd_pin >= 0 && tc->bridge.dev) { + if (tc->hpd_pin >= 0 && tc->bridge.dev && tc->aux.drm_dev) { /* * H is triggered when the GPIO goes high. * |