All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gaosheng Cui <cuigaosheng1@huawei.com>
To: <liviu.dudau@arm.com>, <airlied@gmail.com>, <daniel@ffwll.ch>,
	<robdclark@gmail.com>, <quic_abhinavk@quicinc.com>,
	<dmitry.baryshkov@linaro.org>, <sean@poorly.run>,
	<marijn.suijten@somainline.org>, <neil.armstrong@linaro.org>,
	<sam@ravnborg.org>, <quic_eberman@quicinc.com>,
	<a39.skl@gmail.com>, <quic_gurus@quicinc.com>,
	<cuigaosheng1@huawei.com>,
	<angelogioacchino.delregno@somainline.org>,
	<james.qian.wang@arm.com>
Cc: <dri-devel@lists.freedesktop.org>,
	<linux-arm-msm@vger.kernel.org>,
	<freedreno@lists.freedesktop.org>
Subject: [PATCH v3 1/3] drm/panel: Fix IS_ERR() vs NULL check in nt35950_probe()
Date: Fri, 14 Jul 2023 09:48:18 +0800	[thread overview]
Message-ID: <20230714014820.2186203-2-cuigaosheng1@huawei.com> (raw)
In-Reply-To: <20230714014820.2186203-1-cuigaosheng1@huawei.com>

The mipi_dsi_device_register_full() returns an ERR_PTR() on failure,
we should use IS_ERR() to check the return value.

Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/gpu/drm/panel/panel-novatek-nt35950.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 8b108ac80b55..4903bbf1df55 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -571,7 +571,7 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
 		}
 
 		nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
-		if (!nt->dsi[1]) {
+		if (IS_ERR(nt->dsi[1])) {
 			dev_err(dev, "Cannot get secondary DSI node\n");
 			return -ENODEV;
 		}
-- 
2.25.1


WARNING: multiple messages have this Message-ID (diff)
From: Gaosheng Cui <cuigaosheng1@huawei.com>
To: <liviu.dudau@arm.com>, <airlied@gmail.com>, <daniel@ffwll.ch>,
	<robdclark@gmail.com>, <quic_abhinavk@quicinc.com>,
	<dmitry.baryshkov@linaro.org>, <sean@poorly.run>,
	<marijn.suijten@somainline.org>, <neil.armstrong@linaro.org>,
	<sam@ravnborg.org>, <quic_eberman@quicinc.com>,
	<a39.skl@gmail.com>, <quic_gurus@quicinc.com>,
	<cuigaosheng1@huawei.com>,
	<angelogioacchino.delregno@somainline.org>,
	<james.qian.wang@arm.com>
Cc: linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: [PATCH v3 1/3] drm/panel: Fix IS_ERR() vs NULL check in nt35950_probe()
Date: Fri, 14 Jul 2023 09:48:18 +0800	[thread overview]
Message-ID: <20230714014820.2186203-2-cuigaosheng1@huawei.com> (raw)
In-Reply-To: <20230714014820.2186203-1-cuigaosheng1@huawei.com>

The mipi_dsi_device_register_full() returns an ERR_PTR() on failure,
we should use IS_ERR() to check the return value.

Fixes: 623a3531e9cf ("drm/panel: Add driver for Novatek NT35950 DSI DriverIC panels")
Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
---
 drivers/gpu/drm/panel/panel-novatek-nt35950.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35950.c b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
index 8b108ac80b55..4903bbf1df55 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35950.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35950.c
@@ -571,7 +571,7 @@ static int nt35950_probe(struct mipi_dsi_device *dsi)
 		}
 
 		nt->dsi[1] = mipi_dsi_device_register_full(dsi_r_host, info);
-		if (!nt->dsi[1]) {
+		if (IS_ERR(nt->dsi[1])) {
 			dev_err(dev, "Cannot get secondary DSI node\n");
 			return -ENODEV;
 		}
-- 
2.25.1


  reply	other threads:[~2023-07-14  1:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-14  1:48 [PATCH v3 0/3] Fix IS_ERR() vs NULL check for drm Gaosheng Cui
2023-07-14  1:48 ` Gaosheng Cui
2023-07-14  1:48 ` Gaosheng Cui [this message]
2023-07-14  1:48   ` [PATCH v3 1/3] drm/panel: Fix IS_ERR() vs NULL check in nt35950_probe() Gaosheng Cui
2023-07-14 19:31   ` Sam Ravnborg
2023-07-14 19:31     ` Sam Ravnborg
2023-07-14  1:48 ` [PATCH v3 2/3] drm/msm: Fix IS_ERR() vs NULL check in a5xx_submit_in_rb() Gaosheng Cui
2023-07-14  1:48   ` Gaosheng Cui
2023-07-14 19:10   ` Abhinav Kumar
2023-07-14 19:10     ` Abhinav Kumar
2023-07-14 19:17     ` [Freedreno] " Abhinav Kumar
2023-07-14 19:17       ` Abhinav Kumar
2023-07-14  1:48 ` [PATCH v3 3/3] drm/komeda: Fix IS_ERR() vs NULL check in komeda_component_get_avail_scaler() Gaosheng Cui
2023-07-14  1:48   ` Gaosheng Cui
2023-07-21 10:24   ` Liviu Dudau
2023-07-21 10:24     ` Liviu Dudau
2023-07-24 14:04     ` cuigaosheng
2023-07-24 14:04       ` cuigaosheng

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=20230714014820.2186203-2-cuigaosheng1@huawei.com \
    --to=cuigaosheng1@huawei.com \
    --cc=a39.skl@gmail.com \
    --cc=airlied@gmail.com \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=daniel@ffwll.ch \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=james.qian.wang@arm.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=liviu.dudau@arm.com \
    --cc=marijn.suijten@somainline.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_abhinavk@quicinc.com \
    --cc=quic_eberman@quicinc.com \
    --cc=quic_gurus@quicinc.com \
    --cc=robdclark@gmail.com \
    --cc=sam@ravnborg.org \
    --cc=sean@poorly.run \
    /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 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.