From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: <linus.walleij@linaro.org>, <linux-gpio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <patches@opensource.cirrus.com>
Subject: Re: [PATCH] gpio: swnode: Don't use __free() on result of swnode_get_gpio_device()
Date: Mon, 4 Mar 2024 17:08:54 +0000 [thread overview]
Message-ID: <ZeYAJkHwPImooI9S@ediswmail9.ad.cirrus.com> (raw)
In-Reply-To: <CAMRc=MfAZC8yGXXYrCLeSxonOwozgxRdPC4h=aVgCMSkA7O_dA@mail.gmail.com>
On Mon, Mar 04, 2024 at 05:34:27PM +0100, Bartosz Golaszewski wrote:
> On Mon, Mar 4, 2024 at 5:03 PM Charles Keepax
> <ckeepax@opensource.cirrus.com> wrote:
> >
> > swnode_get_gpio_device() can return an error pointer, however
> > gpio_device_put() is not able to accept error values. Thus using
> > __free() will result in dereferencing an invalid pointer.
> >
>
> Can you post the steps to reproduce this? Because it should work[1].
Hmm... yeah that does look like it should work, I have had the
patch sitting in my tree for a little while, let me double check
and I will come back/resend if it is actually still needed.
Thanks,
Charles
next prev parent reply other threads:[~2024-03-04 17:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-04 16:03 [PATCH] gpio: swnode: Don't use __free() on result of swnode_get_gpio_device() Charles Keepax
2024-03-04 16:34 ` Bartosz Golaszewski
2024-03-04 17:08 ` Charles Keepax [this message]
2024-03-05 14:14 ` Dan Carpenter
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=ZeYAJkHwPImooI9S@ediswmail9.ad.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=brgl@bgdev.pl \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.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