linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/mcde: Fix handling of platform_get_irq() error
@ 2020-08-27  7:11 Krzysztof Kozlowski
  2020-08-27  7:11 ` [PATCH 2/2] drm/tve200: " Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Krzysztof Kozlowski @ 2020-08-27  7:11 UTC (permalink / raw)
  To: Linus Walleij, David Airlie, Daniel Vetter, Eric Anholt,
	dri-devel, linux-kernel
  Cc: Krzysztof Kozlowski

platform_get_irq() returns -ERRNO on error.  In such case comparison
to 0 would pass the check.

Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 drivers/gpu/drm/mcde/mcde_drv.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c
index c592957ed07f..f9b5f450a9cb 100644
--- a/drivers/gpu/drm/mcde/mcde_drv.c
+++ b/drivers/gpu/drm/mcde/mcde_drv.c
@@ -331,8 +331,8 @@ static int mcde_probe(struct platform_device *pdev)
 	}
 
 	irq = platform_get_irq(pdev, 0);
-	if (!irq) {
-		ret = -EINVAL;
+	if (irq < 0) {
+		ret = irq;
 		goto clk_disable;
 	}
 
-- 
2.17.1


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

end of thread, other threads:[~2020-10-17  7:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27  7:11 [PATCH 1/2] drm/mcde: Fix handling of platform_get_irq() error Krzysztof Kozlowski
2020-08-27  7:11 ` [PATCH 2/2] drm/tve200: " Krzysztof Kozlowski
2020-08-28 14:05   ` Linus Walleij
2020-08-28 14:04 ` [PATCH 1/2] drm/mcde: " Linus Walleij
2020-10-17  7:59 ` 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).