All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: Wei Yongjun <weiyongjun1@huawei.com>,
	<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
	<kernel-janitors@vger.kernel.org>
Subject: [PATCH -next v2] drm/mcde: dsi: Fix return value check in mcde_dsi_bind()
Date: Thu, 30 Apr 2020 07:31:45 +0000	[thread overview]
Message-ID: <20200430073145.52321-1-weiyongjun1@huawei.com> (raw)
In-Reply-To: <20200428141459.87624-1-weiyongjun1@huawei.com>

The of_drm_find_bridge() function returns NULL on error, it doesn't return
error pointers so this check doesn't work.

Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 - > v2: add fixes and fix the subject
---
 drivers/gpu/drm/mcde/mcde_dsi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 7af5ebb0c436..e705afc08c4e 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
 			panel = NULL;
 
 			bridge = of_drm_find_bridge(child);
-			if (IS_ERR(bridge)) {
-				dev_err(dev, "failed to find bridge (%ld)\n",
-					PTR_ERR(bridge));
-				return PTR_ERR(bridge);
+			if (!bridge) {
+				dev_err(dev, "failed to find bridge\n");
+				return -EINVAL;
 			}
 		}
 	}




WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	David Airlie <airlied@linux.ie>, Daniel Vetter <daniel@ffwll.ch>
Cc: kernel-janitors@vger.kernel.org,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH -next v2] drm/mcde: dsi: Fix return value check in mcde_dsi_bind()
Date: Thu, 30 Apr 2020 07:31:45 +0000	[thread overview]
Message-ID: <20200430073145.52321-1-weiyongjun1@huawei.com> (raw)
In-Reply-To: <20200428141459.87624-1-weiyongjun1@huawei.com>

The of_drm_find_bridge() function returns NULL on error, it doesn't return
error pointers so this check doesn't work.

Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 - > v2: add fixes and fix the subject
---
 drivers/gpu/drm/mcde/mcde_dsi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 7af5ebb0c436..e705afc08c4e 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
 			panel = NULL;
 
 			bridge = of_drm_find_bridge(child);
-			if (IS_ERR(bridge)) {
-				dev_err(dev, "failed to find bridge (%ld)\n",
-					PTR_ERR(bridge));
-				return PTR_ERR(bridge);
+			if (!bridge) {
+				dev_err(dev, "failed to find bridge\n");
+				return -EINVAL;
 			}
 		}
 	}

WARNING: multiple messages have this Message-ID (diff)
From: Wei Yongjun <weiyongjun1@huawei.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	David Airlie <airlied@linux.ie>,  Daniel Vetter <daniel@ffwll.ch>
Cc: kernel-janitors@vger.kernel.org,
	Wei Yongjun <weiyongjun1@huawei.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH -next v2] drm/mcde: dsi: Fix return value check in mcde_dsi_bind()
Date: Thu, 30 Apr 2020 07:31:45 +0000	[thread overview]
Message-ID: <20200430073145.52321-1-weiyongjun1@huawei.com> (raw)
In-Reply-To: <20200428141459.87624-1-weiyongjun1@huawei.com>

The of_drm_find_bridge() function returns NULL on error, it doesn't return
error pointers so this check doesn't work.

Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
v1 - > v2: add fixes and fix the subject
---
 drivers/gpu/drm/mcde/mcde_dsi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 7af5ebb0c436..e705afc08c4e 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -1073,10 +1073,9 @@ static int mcde_dsi_bind(struct device *dev, struct device *master,
 			panel = NULL;
 
 			bridge = of_drm_find_bridge(child);
-			if (IS_ERR(bridge)) {
-				dev_err(dev, "failed to find bridge (%ld)\n",
-					PTR_ERR(bridge));
-				return PTR_ERR(bridge);
+			if (!bridge) {
+				dev_err(dev, "failed to find bridge\n");
+				return -EINVAL;
 			}
 		}
 	}



_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-04-30  7:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 14:14 [PATCH -next] drm/mcde: dsi: Fix return value check in dev_err() Wei Yongjun
2020-04-28 14:14 ` Wei Yongjun
2020-04-28 14:14 ` Wei Yongjun
2020-04-30  7:31 ` Wei Yongjun [this message]
2020-04-30  7:31   ` [PATCH -next v2] drm/mcde: dsi: Fix return value check in mcde_dsi_bind() Wei Yongjun
2020-04-30  7:31   ` Wei Yongjun
2020-05-12 12:04   ` Linus Walleij
2020-05-12 12:04     ` Linus Walleij
2020-05-12 12:04     ` Linus Walleij
2020-05-12 11:49 ` [PATCH -next] drm/mcde: dsi: Fix return value check in dev_err() Linus Walleij
2020-05-12 11:49   ` Linus Walleij
2020-05-12 11:49   ` Linus Walleij
2020-05-12 13:01   ` Emil Velikov
2020-05-12 13:01     ` Emil Velikov
2020-05-12 13:01     ` Emil Velikov

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=20200430073145.52321-1-weiyongjun1@huawei.com \
    --to=weiyongjun1@huawei.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.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 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.