Message ID | c12bb69b-d676-4345-9712-48aab48f2b48@moroto.mountain |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp4053934vqy; Wed, 6 Dec 2023 04:02:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrdyNafNVpuOckYUH9WeGcP56cHV1gyecmFbtFUT3h/sQLqkrUxxmSHLDlZGW5Fe+co/PB X-Received: by 2002:a17:90b:4ac7:b0:286:b4b4:fc1c with SMTP id mh7-20020a17090b4ac700b00286b4b4fc1cmr817843pjb.65.1701864141106; Wed, 06 Dec 2023 04:02:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701864141; cv=none; d=google.com; s=arc-20160816; b=RwYrMeVH2xqdOOVAzne9PlX4EShaQdN0OgmDk3fXwL7Jc2f9mylhkWopQnfRMb5M5S ajEbWAPHEH6U/SGoJYBtk3L3S/tkh+RfwACMRfumGCYk0afwkz2nvk43X6YhPDgvcXz3 70xLh6KT3/t2kH2WPx9d11tMPrNMyXOIeVaIe1AGs3JibydWq/kgZriyr5ttGZ6jQQTk ABkBTl2pRWbf081WA1/TtGqy0hvyTibrj41f1AfDYhCjUgyLs0k70vF9xE9BqHnVi8pX zUO/eY/fjIjkSzHx7GBa/sJFcMy7MzbeDBA7oPGNf4RPHMeKcIbKuEHjRsuPNMFmIJkA 1nQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=C9luEiqd3rNZRXjehlbFdnQ2e1wzzmxPWamwzOSoC4I=; fh=TH98gAfQp3J9P9BqSqOOoV8J6zi25v1uP8DHfOSaNcs=; b=qZuFyb2SBTMHREtvOnw5yaay32SOAN1hTW4/VH+RKfkKLpx2ic6DdeYfaAtGrhuOkH 4DzEhmKP7UU6UU6S+EBP37AFU3Zax2O9NiJsCDp7b8POqxKDObzcvJjWa5n0kbYn76c+ syX8H4+xIiUIQcU8nNPn+ZuoZ0a/qelCfB/+6rZCQkvsG6y4veD3Kz4/sCo5dXtlv/QH HPvH3KBUXmL5SVgSAQgBjX8rT6HIHZZeX+hh2TUOMvBG5/77c9Duflrf1rOOS/9b8LUS hPbNXqm15RI6jVkEhaldAPp9uZpTM402tmxPn7qz7fbSkZvE5Mo7RwwAwCiplvJokS1+ UuhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jYzdGNcd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id x60-20020a17090a6c4200b00286c13656dcsi2876464pjj.187.2023.12.06.04.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:02:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=jYzdGNcd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2D72C8077533; Wed, 6 Dec 2023 04:02:16 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378256AbjLFMCH (ORCPT <rfc822;pusanteemu@gmail.com> + 99 others); Wed, 6 Dec 2023 07:02:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59954 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377841AbjLFMCF (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 6 Dec 2023 07:02:05 -0500 Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47E03181 for <linux-kernel@vger.kernel.org>; Wed, 6 Dec 2023 04:02:11 -0800 (PST) Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40b5155e154so74052605e9.3 for <linux-kernel@vger.kernel.org>; Wed, 06 Dec 2023 04:02:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701864130; x=1702468930; darn=vger.kernel.org; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=C9luEiqd3rNZRXjehlbFdnQ2e1wzzmxPWamwzOSoC4I=; b=jYzdGNcdyUC1zTZyUjENMm1D9CEv1oooXRegryqyxYLT6v2+rFO/HoiYPaQF8kWBUc 9nSCZN2cqkI17HsYsCJUGiVKvZ46sbXo+9oNhgXsJ5y8LVUiUcPqVXnOHlDSdvB+o/SY SP2gWuNLiQ0ZEslR9b+0bOYT38N9bVD9lBakC0Cu2UZzxUwMzuL5h3EUd+p4ujpRASOv e8s1ZKIIlpNOEhyIONU9dHG4GkAWoJbwRve4zawfOsm/N95U7BxCuEzMpFzZjNErwm4W eo1EgMxKGfC5kqdXAUfSxSWlG//0Pl9gGC/+9Suksi0W6vNWVykGGo7kwiH1gFlM55e5 0z1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701864130; x=1702468930; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=C9luEiqd3rNZRXjehlbFdnQ2e1wzzmxPWamwzOSoC4I=; b=PG6PX4o2jNgbp5rCEeDgjfh3K4oyMkFsLYBihdBmViHRQT8+9nSDbNzaCeNoaV/VaJ 1iZ/UEuxmzvn+Yann0dRbC3AiVb64wB5QiAIyyByUz5a93RKqu35P1ItTjPBAoRFNA/7 VAl2TMkJVBUhk4uYk61VrMqLOVMyNjcs//9Z2IIw/PZcchdHVopiZddWKXiMIOkmojw2 zdnBxJNOmtHEa454rzcxgAUZIesoelNDOkTR8TUxnRL2/KsKuHQ+TPPdG+Pn4I6l84r2 ddZnGXb4yqcP1dFonqOZkk8ZuLyFvLPolr5CUs+UnnQQ5BHZlzgDPH7f/Fz85uFjRYmE ri8w== X-Gm-Message-State: AOJu0YwgimUuWPfzEejpajt90sIzHFPik6GGX9wAcjkkgfWM5qIgd3Ok 6aTRGUBZBGWVqkiaEbdJ+4cpMg== X-Received: by 2002:a7b:cd0d:0:b0:40b:5e4a:4072 with SMTP id f13-20020a7bcd0d000000b0040b5e4a4072mr523452wmj.146.1701864129773; Wed, 06 Dec 2023 04:02:09 -0800 (PST) Received: from localhost ([102.36.222.112]) by smtp.gmail.com with ESMTPSA id w17-20020a05600c475100b0040b45356b72sm25543935wmo.33.2023.12.06.04.02.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Dec 2023 04:02:09 -0800 (PST) Date: Wed, 6 Dec 2023 15:02:05 +0300 From: Dan Carpenter <dan.carpenter@linaro.org> To: Kuogee Hsieh <quic_khsieh@quicinc.com> Cc: Rob Clark <robdclark@gmail.com>, Abhinav Kumar <quic_abhinavk@quicinc.com>, Dmitry Baryshkov <dmitry.baryshkov@linaro.org>, Sean Paul <sean@poorly.run>, Marijn Suijten <marijn.suijten@somainline.org>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Bjorn Andersson <quic_bjorande@quicinc.com>, Vinod Polimera <quic_vpolimer@quicinc.com>, Stephen Boyd <swboyd@chromium.org>, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] drm/msm/dp: Fix platform_get_irq() check Message-ID: <c12bb69b-d676-4345-9712-48aab48f2b48@moroto.mountain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Mailer: git-send-email haha only kidding X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Wed, 06 Dec 2023 04:02:16 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784533893694398236 X-GMAIL-MSGID: 1784533893694398236 |
Series |
drm/msm/dp: Fix platform_get_irq() check
|
|
Commit Message
Dan Carpenter
Dec. 6, 2023, 12:02 p.m. UTC
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(-)
Comments
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>
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,
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,