From: Jonathan Cameron <jic23@kernel.org>
To: Marcus Folkesson <marcus.folkesson@gmail.com>
Cc: Kent Gustavsson <kent@minoris.se>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel test robot <lkp@intel.com>,
Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] iio: adc: mcp3911: return proper error code on failure to allocate trigger
Date: Sun, 2 Oct 2022 13:55:12 +0100 [thread overview]
Message-ID: <20221002135512.7cf08a9f@jic23-huawei> (raw)
In-Reply-To: <20220927092537.94663-1-marcus.folkesson@gmail.com>
On Tue, 27 Sep 2022 11:25:37 +0200
Marcus Folkesson <marcus.folkesson@gmail.com> wrote:
> smatch warnings:
> drivers/iio/adc/mcp3911.c:441 mcp3911_probe() warn: passing zero to 'PTR_ERR'
>
> Reported-by: kernel test robot <lkp@intel.com>
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Applied, with addition of fixes tag to the fixes-togreg branch of iio.git.
Slightly messy at this point in the cycle, but I can't push this out until
Linus takes Greg's char-misc-next pull request as otherwise linux-next will
get the content of Greg's tree via mine an potentially make a mess.
Should only matter for a few days though then I'll push my fixes-togreg branch
out (which I've moved to being based on char-misc-next to allow me to apply
a few patches for things only recently introduced).
Jonathan
> ---
> drivers/iio/adc/mcp3911.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/mcp3911.c b/drivers/iio/adc/mcp3911.c
> index 0d768006eabb..e55db02c534f 100644
> --- a/drivers/iio/adc/mcp3911.c
> +++ b/drivers/iio/adc/mcp3911.c
> @@ -554,7 +554,7 @@ static int mcp3911_probe(struct spi_device *spi)
> indio_dev->name,
> iio_device_id(indio_dev));
> if (!adc->trig)
> - return PTR_ERR(adc->trig);
> + return -ENOMEM;
>
> adc->trig->ops = &mcp3911_trigger_ops;
> iio_trigger_set_drvdata(adc->trig, adc);
prev parent reply other threads:[~2022-10-02 12:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-27 9:25 Marcus Folkesson
2022-10-02 12:55 ` Jonathan Cameron [this message]
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=20221002135512.7cf08a9f@jic23-huawei \
--to=jic23@kernel.org \
--cc=dan.carpenter@oracle.com \
--cc=kent@minoris.se \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.com \
--cc=marcus.folkesson@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®