dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/msm/dp: Fix platform_get_irq() check
@ 2023-12-06 12:02 Dan Carpenter
  2023-12-08  1:11 ` Dmitry Baryshkov
  2023-12-08  1:25 ` Dmitry Baryshkov
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2023-12-06 12:02 UTC (permalink / raw)
  To: Kuogee Hsieh
  Cc: freedreno, Bjorn Andersson, kernel-janitors, Abhinav Kumar,
	dri-devel, Vinod Polimera, linux-arm-msm, Dmitry Baryshkov,
	Marijn Suijten, Stephen Boyd, Sean Paul, linux-kernel

The platform_get_irq() function returns negative error codes.  It never
returns zero.  Fix the check accordingly.

Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/gpu/drm/msm/dp/dp_display.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
index 61b7103498a7..d80cb3d14c6b 100644
--- a/drivers/gpu/drm/msm/dp/dp_display.c
+++ b/drivers/gpu/drm/msm/dp/dp_display.c
@@ -1166,9 +1166,9 @@ static int dp_display_request_irq(struct dp_display_private *dp)
 	struct platform_device *pdev = dp->dp_display.pdev;
 
 	dp->irq = platform_get_irq(pdev, 0);
-	if (!dp->irq) {
+	if (dp->irq < 0) {
 		DRM_ERROR("failed to get irq\n");
-		return -EINVAL;
+		return dp->irq;
 	}
 
 	rc = devm_request_irq(&pdev->dev, dp->irq, dp_display_irq_handler,
-- 
2.42.0


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

* Re: [PATCH] drm/msm/dp: Fix platform_get_irq() check
  2023-12-06 12:02 [PATCH] drm/msm/dp: Fix platform_get_irq() check Dan Carpenter
@ 2023-12-08  1:11 ` Dmitry Baryshkov
  2023-12-08  1:25 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-12-08  1:11 UTC (permalink / raw)
  To: Dan Carpenter, Kuogee Hsieh
  Cc: freedreno, Bjorn Andersson, kernel-janitors, Abhinav Kumar,
	dri-devel, Vinod Polimera, linux-arm-msm, Marijn Suijten,
	Stephen Boyd, Sean Paul, linux-kernel

On 06/12/2023 14:02, Dan Carpenter wrote:
> The platform_get_irq() function returns negative error codes.  It never
> returns zero.  Fix the check accordingly.
> 
> Fixes: 82c2a5751227 ("drm/msm/dp: tie dp_display_irq_handler() with dp driver")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
> ---
>   drivers/gpu/drm/msm/dp/dp_display.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH] drm/msm/dp: Fix platform_get_irq() check
  2023-12-06 12:02 [PATCH] drm/msm/dp: Fix platform_get_irq() check Dan Carpenter
  2023-12-08  1:11 ` Dmitry Baryshkov
@ 2023-12-08  1:25 ` Dmitry Baryshkov
  1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Baryshkov @ 2023-12-08  1:25 UTC (permalink / raw)
  To: Kuogee Hsieh, Dan Carpenter
  Cc: freedreno, Bjorn Andersson, kernel-janitors, Abhinav Kumar,
	dri-devel, Vinod Polimera, linux-arm-msm, Marijn Suijten,
	Stephen Boyd, Sean Paul, linux-kernel


On Wed, 06 Dec 2023 15:02:05 +0300, Dan Carpenter wrote:
> The platform_get_irq() function returns negative error codes.  It never
> returns zero.  Fix the check accordingly.
> 
> 

Applied, thanks!

[1/1] drm/msm/dp: Fix platform_get_irq() check
      https://gitlab.freedesktop.org/lumag/msm/-/commit/c4ac0c6c96f0

Best regards,
-- 
Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

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

end of thread, other threads:[~2023-12-08  1:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 12:02 [PATCH] drm/msm/dp: Fix platform_get_irq() check Dan Carpenter
2023-12-08  1:11 ` Dmitry Baryshkov
2023-12-08  1:25 ` Dmitry Baryshkov

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).