From: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
To: Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
Abhinav Kumar <quic_abhinavk@quicinc.com>,
Marijn Suijten <marijn.suijten@somainline.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Bjorn Andersson <andersson@kernel.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org
Subject: [PATCH 02/13] drm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error handling
Date: Fri, 7 Jul 2023 23:37:13 +0300 [thread overview]
Message-ID: <20230707203724.3820757-3-dmitry.baryshkov@linaro.org> (raw)
In-Reply-To: <20230707203724.3820757-1-dmitry.baryshkov@linaro.org>
Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If
the value is NULL, then the function will return 0 instead of a proper
return code. Replace IS_ERR_OR_NULL() with IS_ERR() in the
dpu_hw_intr_init() error check.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
index e7ac02e92f42..85b8c9cc99ef 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c
@@ -1096,7 +1096,7 @@ static int dpu_kms_hw_init(struct msm_kms *kms)
}
dpu_kms->hw_intr = dpu_hw_intr_init(dpu_kms->mmio, dpu_kms->catalog);
- if (IS_ERR_OR_NULL(dpu_kms->hw_intr)) {
+ if (IS_ERR(dpu_kms->hw_intr)) {
rc = PTR_ERR(dpu_kms->hw_intr);
DPU_ERROR("hw_intr init failed: %d\n", rc);
dpu_kms->hw_intr = NULL;
--
2.39.2
next prev parent reply other threads:[~2023-07-07 20:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-07 20:37 [PATCH 00/13] drm/msm/dpu: use managed memory allocations Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 01/13] drm/msm/dpu: cleanup dpu_kms_hw_init error path Dmitry Baryshkov
2023-07-07 23:25 ` Konrad Dybcio
2023-07-07 23:48 ` Dmitry Baryshkov
2023-07-08 10:01 ` Konrad Dybcio
2023-07-07 20:37 ` Dmitry Baryshkov [this message]
2023-07-07 20:37 ` [PATCH 03/13] drm/msm/dpu: use devres-managed allocation for interrupts data Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 04/13] drm/msm/dpu: use devres-managed allocation for VBIF data Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 05/13] drm/msm/dpu: use devres-managed allocation for MDP TOP Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 06/13] drm/msm/dpu: use devres-managed allocation for HW blocks Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 07/13] drm/msm/dpu: drop unused dpu_plane::lock Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 08/13] drm/msm/dpu: remove QoS teardown on plane destruction Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 09/13] drm/msm/dpu: use drmm-managed allocation for dpu_plane Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 10/13] drm/msm/dpu: use drmm-managed allocation for dpu_crtc Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 11/13] drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 12/13] drm/msm/dpu: drop dpu_encoder_phys_ops::destroy Dmitry Baryshkov
2023-07-07 20:37 ` [PATCH 13/13] drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt 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=20230707203724.3820757-3-dmitry.baryshkov@linaro.org \
--to=dmitry.baryshkov@linaro.org \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=quic_abhinavk@quicinc.com \
--cc=robdclark@gmail.com \
--cc=sean@poorly.run \
--cc=swboyd@chromium.org \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox