All of lore.kernel.org
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "ethan.zhao" <ethan.kernel@gmail.com>
Cc: Wei Yongjun <weiyj.lk@gmail.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] r_du_lvdsenc.c : Check return value of devm_ioremap_resource with IS_ERR
Date: Tue, 10 Dec 2013 03:24:13 +0100	[thread overview]
Message-ID: <1623649.XDp4FCPInj@avalon> (raw)
In-Reply-To: <1386470506-553-1-git-send-email-ethan.kernel@gmail.com>

Hi Ethan,

Thank you for the patch.

On Sunday 08 December 2013 10:41:46 ethan.zhao wrote:
> function devm_ioremap_resource() doesn't return NULL, should check its
> return value with helper IS_ERR().
> 
> Signed-off-by: ethan.zhao <ethan.kernel@gmail.com>

This issue has already been addressed by a patch sent to the dri-devel mailing 
list by Wei Yongjun (https://lkml.org/lkml/2013/8/22/637).

I've asked for a v2 to be submitted but haven't received any reply. I'll fix 
the problem myself and send the patch now.

> ---
>  drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c index a0f6a17..93190ab 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> @@ -151,7 +151,7 @@ static int rcar_du_lvdsenc_get_resources(struct
> rcar_du_lvdsenc *lvds, }
> 
>  	lvds->mmio = devm_ioremap_resource(&pdev->dev, mem);
> -	if (lvds->mmio == NULL) {
> +	if (IS_ERR(lvds->mmio)) {
>  		dev_err(&pdev->dev, "failed to remap memory resource for %s\n",
>  			name);
>  		return -ENOMEM;

-- 
Regards,

Laurent Pinchart

WARNING: multiple messages have this Message-ID (diff)
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: "ethan.zhao" <ethan.kernel@gmail.com>
Cc: linux-kernel@vger.kernel.org, Wei Yongjun <weiyj.lk@gmail.com>,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] r_du_lvdsenc.c : Check return value of devm_ioremap_resource with IS_ERR
Date: Tue, 10 Dec 2013 03:24:13 +0100	[thread overview]
Message-ID: <1623649.XDp4FCPInj@avalon> (raw)
In-Reply-To: <1386470506-553-1-git-send-email-ethan.kernel@gmail.com>

Hi Ethan,

Thank you for the patch.

On Sunday 08 December 2013 10:41:46 ethan.zhao wrote:
> function devm_ioremap_resource() doesn't return NULL, should check its
> return value with helper IS_ERR().
> 
> Signed-off-by: ethan.zhao <ethan.kernel@gmail.com>

This issue has already been addressed by a patch sent to the dri-devel mailing 
list by Wei Yongjun (https://lkml.org/lkml/2013/8/22/637).

I've asked for a v2 to be submitted but haven't received any reply. I'll fix 
the problem myself and send the patch now.

> ---
>  drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c index a0f6a17..93190ab 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_lvdsenc.c
> @@ -151,7 +151,7 @@ static int rcar_du_lvdsenc_get_resources(struct
> rcar_du_lvdsenc *lvds, }
> 
>  	lvds->mmio = devm_ioremap_resource(&pdev->dev, mem);
> -	if (lvds->mmio == NULL) {
> +	if (IS_ERR(lvds->mmio)) {
>  		dev_err(&pdev->dev, "failed to remap memory resource for %s\n",
>  			name);
>  		return -ENOMEM;

-- 
Regards,

Laurent Pinchart


  reply	other threads:[~2013-12-10  2:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-08  2:41 [PATCH] r_du_lvdsenc.c : Check return value of devm_ioremap_resource with IS_ERR ethan.zhao
2013-12-10  2:24 ` Laurent Pinchart [this message]
2013-12-10  2:24   ` Laurent Pinchart
2013-12-10  6:59   ` Ethan Zhao

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=1623649.XDp4FCPInj@avalon \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ethan.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=weiyj.lk@gmail.com \
    /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.