Skip to content

Commit 6ed6e02

Browse files
YueHaibinggregkh
authored andcommitted
drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe
[ Upstream commit c2530cc ] gpiod_to_irq() return negative value in case of error, the existing code doesn't handle negative error codes. If the HPD gpio supports IRQs (gpiod_to_irq returns a valid number), we use the IRQ. If it doesn't (gpiod_to_irq returns an error), it gets polled via detect(). Fixes: cff5e6f ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20201102143024.26216-1-yuehaibing@huawei.com Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 332a2c3 commit 6ed6e02

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/gpu/drm/bridge/ti-tpd12s015.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ static int tpd12s015_probe(struct platform_device *pdev)
160160

161161
/* Register the IRQ if the HPD GPIO is IRQ-capable. */
162162
tpd->hpd_irq = gpiod_to_irq(tpd->hpd_gpio);
163-
if (tpd->hpd_irq) {
163+
if (tpd->hpd_irq >= 0) {
164164
ret = devm_request_threaded_irq(&pdev->dev, tpd->hpd_irq, NULL,
165165
tpd12s015_hpd_isr,
166166
IRQF_TRIGGER_RISING |

0 commit comments

Comments
 (0)