From: Caesar Wang <caesar.upstream@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] nvmem: delete unneeded IS_ERR test
Date: Sun, 20 Dec 2015 02:21:50 +0000 [thread overview]
Message-ID: <567610BE.8010706@gmail.com> (raw)
In-Reply-To: <1450559973-9067-1-git-send-email-Julia.Lawall@lip6.fr>
Hi Julia,
Thanks to check this, but there was a patch fixing it.:-)
在 2015年12月20日 05:19, Julia Lawall 写道:
> devm_kzalloc returns NULL rather than an ERR_PTR value.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression x,e;
> @@
>
> * x = devm_kzalloc(...)
> ... when != x = e
> * IS_ERR(x)
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/nvmem/rockchip-efuse.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
> index f552134..811c73c 100644
> --- a/drivers/nvmem/rockchip-efuse.c
> +++ b/drivers/nvmem/rockchip-efuse.c
> @@ -136,8 +136,8 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
>
> context = devm_kzalloc(dev, sizeof(struct rockchip_efuse_context),
> GFP_KERNEL);
> - if (IS_ERR(context))
> - return PTR_ERR(context);
> + if (!context)
> + return -ENOMEM;
Fixed in this patch[0].
patch[0]:
https://patchwork.kernel.org/patch/7842821/
Thanks,
Caesar
>
> clk = devm_clk_get(dev, "pclk_efuse");
> if (IS_ERR(clk))
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Caesar Wang <caesar.upstream@gmail.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] nvmem: delete unneeded IS_ERR test
Date: Sun, 20 Dec 2015 10:21:50 +0800 [thread overview]
Message-ID: <567610BE.8010706@gmail.com> (raw)
In-Reply-To: <1450559973-9067-1-git-send-email-Julia.Lawall@lip6.fr>
Hi Julia,
Thanks to check this, but there was a patch fixing it.:-)
在 2015年12月20日 05:19, Julia Lawall 写道:
> devm_kzalloc returns NULL rather than an ERR_PTR value.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression x,e;
> @@
>
> * x = devm_kzalloc(...)
> ... when != x = e
> * IS_ERR(x)
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/nvmem/rockchip-efuse.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
> index f552134..811c73c 100644
> --- a/drivers/nvmem/rockchip-efuse.c
> +++ b/drivers/nvmem/rockchip-efuse.c
> @@ -136,8 +136,8 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
>
> context = devm_kzalloc(dev, sizeof(struct rockchip_efuse_context),
> GFP_KERNEL);
> - if (IS_ERR(context))
> - return PTR_ERR(context);
> + if (!context)
> + return -ENOMEM;
Fixed in this patch[0].
patch[0]:
https://patchwork.kernel.org/patch/7842821/
Thanks,
Caesar
>
> clk = devm_clk_get(dev, "pclk_efuse");
> if (IS_ERR(clk))
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: caesar.upstream@gmail.com (Caesar Wang)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] nvmem: delete unneeded IS_ERR test
Date: Sun, 20 Dec 2015 10:21:50 +0800 [thread overview]
Message-ID: <567610BE.8010706@gmail.com> (raw)
In-Reply-To: <1450559973-9067-1-git-send-email-Julia.Lawall@lip6.fr>
Hi Julia,
Thanks to check this, but there was a patch fixing it.:-)
? 2015?12?20? 05:19, Julia Lawall ??:
> devm_kzalloc returns NULL rather than an ERR_PTR value.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression x,e;
> @@
>
> * x = devm_kzalloc(...)
> ... when != x = e
> * IS_ERR(x)
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/nvmem/rockchip-efuse.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
> index f552134..811c73c 100644
> --- a/drivers/nvmem/rockchip-efuse.c
> +++ b/drivers/nvmem/rockchip-efuse.c
> @@ -136,8 +136,8 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
>
> context = devm_kzalloc(dev, sizeof(struct rockchip_efuse_context),
> GFP_KERNEL);
> - if (IS_ERR(context))
> - return PTR_ERR(context);
> + if (!context)
> + return -ENOMEM;
Fixed in this patch[0].
patch[0]:
https://patchwork.kernel.org/patch/7842821/
Thanks,
Caesar
>
> clk = devm_clk_get(dev, "pclk_efuse");
> if (IS_ERR(clk))
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
WARNING: multiple messages have this Message-ID (diff)
From: Caesar Wang <caesar.upstream@gmail.com>
To: Julia Lawall <Julia.Lawall@lip6.fr>,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Heiko Stuebner <heiko@sntech.de>,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-rockchip@lists.infradead.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] nvmem: delete unneeded IS_ERR test
Date: Sun, 20 Dec 2015 10:21:50 +0800 [thread overview]
Message-ID: <567610BE.8010706@gmail.com> (raw)
In-Reply-To: <1450559973-9067-1-git-send-email-Julia.Lawall@lip6.fr>
Hi Julia,
Thanks to check this, but there was a patch fixing it.:-)
在 2015年12月20日 05:19, Julia Lawall 写道:
> devm_kzalloc returns NULL rather than an ERR_PTR value.
>
> The semantic match that finds this problem is as follows:
> (http://coccinelle.lip6.fr/)
>
> // <smpl>
> @@
> expression x,e;
> @@
>
> * x = devm_kzalloc(...)
> ... when != x = e
> * IS_ERR(x)
> // </smpl>
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
>
> ---
> drivers/nvmem/rockchip-efuse.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/nvmem/rockchip-efuse.c b/drivers/nvmem/rockchip-efuse.c
> index f552134..811c73c 100644
> --- a/drivers/nvmem/rockchip-efuse.c
> +++ b/drivers/nvmem/rockchip-efuse.c
> @@ -136,8 +136,8 @@ static int rockchip_efuse_probe(struct platform_device *pdev)
>
> context = devm_kzalloc(dev, sizeof(struct rockchip_efuse_context),
> GFP_KERNEL);
> - if (IS_ERR(context))
> - return PTR_ERR(context);
> + if (!context)
> + return -ENOMEM;
Fixed in this patch[0].
patch[0]:
https://patchwork.kernel.org/patch/7842821/
Thanks,
Caesar
>
> clk = devm_clk_get(dev, "pclk_efuse");
> if (IS_ERR(clk))
>
>
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
next prev parent reply other threads:[~2015-12-20 2:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-19 21:19 [PATCH] nvmem: delete unneeded IS_ERR test Julia Lawall
2015-12-19 21:19 ` Julia Lawall
2015-12-19 21:19 ` Julia Lawall
2015-12-20 2:21 ` Caesar Wang [this message]
2015-12-20 2:21 ` Caesar Wang
2015-12-20 2:21 ` Caesar Wang
2015-12-20 2:21 ` Caesar Wang
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=567610BE.8010706@gmail.com \
--to=caesar.upstream@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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.