From: cgel.zte@gmail.com To: sean@poorly.run, quic_abhinavk@quicinc.com Cc: daniel.thompson@linaro.org, airlied@linux.ie, linux-arm-msm@vger.kernel.org, lv.ruyi@zte.com.cn, linmq006@gmail.com, dri-devel@lists.freedesktop.org, swboyd@chromium.org, christophe.jaillet@wanadoo.fr, dmitry.baryshkov@linaro.org, freedreno@lists.freedesktop.org, Zeal Robot <zealci@zte.com.cn>, linux-kernel@vger.kernel.org, angelogioacchino.delregno@collabora.com Subject: [PATCH] drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() Date: Mon, 25 Apr 2022 09:18:31 +0000 [thread overview] Message-ID: <20220425091831.3500487-1-lv.ruyi@zte.com.cn> (raw) From: Lv Ruyi <lv.ruyi@zte.com.cn> The irq_of_parse_and_map() function returns 0 on failure, and does not return a negative value anyhow, so never enter this conditional branch. Fixes: f6a8eaca0ea1 ("drm/msm/mdp5: use irqdomains") Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> --- drivers/gpu/drm/msm/hdmi/hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index ec324352e862..c3b661c2932d 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -298,9 +298,9 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, drm_connector_attach_encoder(hdmi->connector, hdmi->encoder); hdmi->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (hdmi->irq < 0) { - ret = hdmi->irq; - DRM_DEV_ERROR(dev->dev, "failed to get irq: %d\n", ret); + if (!hdmi->irq) { + ret = -EINVAL; + DRM_DEV_ERROR(dev->dev, "failed to get irq\n"); goto fail; } -- 2.25.1
WARNING: multiple messages have this Message-ID (diff)
From: cgel.zte@gmail.com To: sean@poorly.run, quic_abhinavk@quicinc.com Cc: robdclark@gmail.com, airlied@linux.ie, daniel@ffwll.ch, dmitry.baryshkov@linaro.org, swboyd@chromium.org, angelogioacchino.delregno@collabora.com, daniel.thompson@linaro.org, linmq006@gmail.com, christophe.jaillet@wanadoo.fr, lv.ruyi@zte.com.cn, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Zeal Robot <zealci@zte.com.cn> Subject: [PATCH] drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() Date: Mon, 25 Apr 2022 09:18:31 +0000 [thread overview] Message-ID: <20220425091831.3500487-1-lv.ruyi@zte.com.cn> (raw) From: Lv Ruyi <lv.ruyi@zte.com.cn> The irq_of_parse_and_map() function returns 0 on failure, and does not return a negative value anyhow, so never enter this conditional branch. Fixes: f6a8eaca0ea1 ("drm/msm/mdp5: use irqdomains") Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn> --- drivers/gpu/drm/msm/hdmi/hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi.c b/drivers/gpu/drm/msm/hdmi/hdmi.c index ec324352e862..c3b661c2932d 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi.c @@ -298,9 +298,9 @@ int msm_hdmi_modeset_init(struct hdmi *hdmi, drm_connector_attach_encoder(hdmi->connector, hdmi->encoder); hdmi->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); - if (hdmi->irq < 0) { - ret = hdmi->irq; - DRM_DEV_ERROR(dev->dev, "failed to get irq: %d\n", ret); + if (!hdmi->irq) { + ret = -EINVAL; + DRM_DEV_ERROR(dev->dev, "failed to get irq\n"); goto fail; } -- 2.25.1
next reply other threads:[~2022-04-25 9:18 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-25 9:18 cgel.zte [this message] 2022-04-25 9:18 ` [PATCH] drm/msm/hdmi: fix error check return value of irq_of_parse_and_map() cgel.zte 2022-04-25 20:11 ` Stephen Boyd 2022-04-25 20:11 ` Stephen Boyd 2022-04-25 21:11 ` Dmitry Baryshkov 2022-04-25 21:11 ` Dmitry Baryshkov
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220425091831.3500487-1-lv.ruyi@zte.com.cn \ --to=cgel.zte@gmail.com \ --cc=airlied@linux.ie \ --cc=angelogioacchino.delregno@collabora.com \ --cc=christophe.jaillet@wanadoo.fr \ --cc=daniel.thompson@linaro.org \ --cc=dmitry.baryshkov@linaro.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=freedreno@lists.freedesktop.org \ --cc=linmq006@gmail.com \ --cc=linux-arm-msm@vger.kernel.org \ --cc=linux-kernel@vger.kernel.org \ --cc=lv.ruyi@zte.com.cn \ --cc=quic_abhinavk@quicinc.com \ --cc=sean@poorly.run \ --cc=swboyd@chromium.org \ --cc=zealci@zte.com.cn \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.