linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe
@ 2020-10-31  3:16 YueHaibing
  2020-10-31  7:19 ` Sam Ravnborg
  2020-11-02 14:30 ` [PATCH v2] " YueHaibing
  0 siblings, 2 replies; 10+ messages in thread
From: YueHaibing @ 2020-10-31  3:16 UTC (permalink / raw)
  To: a.hajda, narmstrong, Laurent.pinchart, jonas, jernej.skrabec,
	airlied, daniel, tomi.valkeinen, yuehaibing, sebastian.reichel,
	sam
  Cc: dri-devel, linux-kernel

gpiod_to_irq() return negative value in case of error,
the existing code handle negative error codes wrongly.

Fixes: cff5e6f7e83f ("drm/bridge: Add driver for the TI TPD12S015 HDMI level shifter")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/gpu/drm/bridge/ti-tpd12s015.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/ti-tpd12s015.c b/drivers/gpu/drm/bridge/ti-tpd12s015.c
index 514cbf0eac75..a18d5197c16c 100644
--- a/drivers/gpu/drm/bridge/ti-tpd12s015.c
+++ b/drivers/gpu/drm/bridge/ti-tpd12s015.c
@@ -160,7 +160,7 @@ static int tpd12s015_probe(struct platform_device *pdev)
 
 	/* Register the IRQ if the HPD GPIO is IRQ-capable. */
 	tpd->hpd_irq = gpiod_to_irq(tpd->hpd_gpio);
-	if (tpd->hpd_irq) {
+	if (tpd->hpd_irq > 0) {
 		ret = devm_request_threaded_irq(&pdev->dev, tpd->hpd_irq, NULL,
 						tpd12s015_hpd_isr,
 						IRQF_TRIGGER_RISING |
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-11-05 21:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31  3:16 [PATCH] drm/bridge: tpd12s015: Fix irq registering in tpd12s015_probe YueHaibing
2020-10-31  7:19 ` Sam Ravnborg
2020-10-31 12:32   ` Yuehaibing
2020-11-02  6:57   ` Tomi Valkeinen
2020-11-02  9:36     ` Yuehaibing
2020-11-02  9:42       ` Tomi Valkeinen
2020-11-02 14:30 ` [PATCH v2] " YueHaibing
2020-11-02 22:19   ` Laurent Pinchart
2020-11-03  6:49   ` Tomi Valkeinen
2020-11-05 21:10   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).