From: Vignesh Raghavendra <vigneshr@ti.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Julien Panis <jpanis@baylibre.com>
Cc: William Breathitt Gray <william.gray@linaro.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
<linux-iio@vger.kernel.org>, <linux-omap@vger.kernel.org>,
<kernel-janitors@vger.kernel.org>
Subject: Re: [PATCH] counter: ti-ecap-capture: fix IS_ERR() vs NULL check
Date: Wed, 12 Oct 2022 21:57:00 +0530 [thread overview]
Message-ID: <a559e9fa-b560-06fb-8555-5af22f47539e@ti.com> (raw)
In-Reply-To: <Y0bUbZvfDJHBG9C6@kili>
Hi,
On 12/10/22 8:21 pm, Dan Carpenter wrote:
> The devm_counter_alloc() function returns NULL on error. It doesn't
> return error pointers.
>
> Fixes: 4e2f42aa00b6 ("counter: ti-ecap-capture: capture driver support for ECAP")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vignesh Raghavendra <vigneshr@ti.com>
Thanks for the fix!
> ---
> drivers/counter/ti-ecap-capture.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/counter/ti-ecap-capture.c b/drivers/counter/ti-ecap-capture.c
> index af10de30aba5..8104d02bb5a4 100644
> --- a/drivers/counter/ti-ecap-capture.c
> +++ b/drivers/counter/ti-ecap-capture.c
> @@ -479,8 +479,8 @@ static int ecap_cnt_probe(struct platform_device *pdev)
> int ret;
>
> counter_dev = devm_counter_alloc(dev, sizeof(*ecap_dev));
> - if (IS_ERR(counter_dev))
> - return PTR_ERR(counter_dev);
> + if (!counter_dev)
> + return -ENOMEM;
>
> counter_dev->name = ECAP_DRV_NAME;
> counter_dev->parent = dev;
next prev parent reply other threads:[~2022-10-12 16:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-12 14:51 [PATCH] counter: ti-ecap-capture: fix IS_ERR() vs NULL check Dan Carpenter
2022-10-12 15:43 ` Julien Panis
2022-10-12 16:27 ` Vignesh Raghavendra [this message]
2022-10-13 0:50 ` William Breathitt Gray
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=a559e9fa-b560-06fb-8555-5af22f47539e@ti.com \
--to=vigneshr@ti.com \
--cc=dan.carpenter@oracle.com \
--cc=gregkh@linuxfoundation.org \
--cc=jpanis@baylibre.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=william.gray@linaro.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