Skip to content

Commit a10f910

Browse files
Loic Poulainlumag
authored andcommitted
drm: bridge: anx7625: Fix NULL pointer dereference with early IRQ
If the interrupt occurs before resource initialization is complete, the interrupt handler/worker may access uninitialized data such as the I2C tcpc_client device, potentially leading to NULL pointer dereference. Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com> Fixes: 8bdfc5d ("drm/bridge: anx7625: Add anx7625 MIPI DSI/DPI to DP") Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Link: https://lore.kernel.org/r/20250709085438.56188-1-loic.poulain@oss.qualcomm.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
1 parent 07c2494 commit a10f910

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/gpu/drm/bridge/analogix/anx7625.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,7 +2677,7 @@ static int anx7625_i2c_probe(struct i2c_client *client)
26772677
ret = devm_request_threaded_irq(dev, platform->pdata.intp_irq,
26782678
NULL, anx7625_intr_hpd_isr,
26792679
IRQF_TRIGGER_FALLING |
2680-
IRQF_ONESHOT,
2680+
IRQF_ONESHOT | IRQF_NO_AUTOEN,
26812681
"anx7625-intp", platform);
26822682
if (ret) {
26832683
DRM_DEV_ERROR(dev, "fail to request irq\n");
@@ -2746,8 +2746,10 @@ static int anx7625_i2c_probe(struct i2c_client *client)
27462746
}
27472747

27482748
/* Add work function */
2749-
if (platform->pdata.intp_irq)
2749+
if (platform->pdata.intp_irq) {
2750+
enable_irq(platform->pdata.intp_irq);
27502751
queue_work(platform->workqueue, &platform->work);
2752+
}
27512753

27522754
if (platform->pdata.audio_en)
27532755
anx7625_register_audio(dev, platform);

0 commit comments

Comments
 (0)