[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMRc=Mcsk3dHR9c99Muqqej789YzMmamLfays4LiTRV9jn=+Lg@mail.gmail.com>
Date: Tue, 23 Dec 2025 17:09:18 +0100
From: Bartosz Golaszewski <brgl@...nel.org>
To: Abdun Nihaal <nihaal@....iitm.ac.in>
Cc: linusw@...nel.org, linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] gpio: mpsse: fix reference leak in gpio_mpsse_probe()
error paths
On Tue, Dec 23, 2025 at 7:53 AM Abdun Nihaal <nihaal@....iitm.ac.in> wrote:
>
> The reference obtained by calling usb_get_dev() is not released in the
> gpio_mpsse_probe() error paths. Fix that by calling usb_put_dev().
>
> Cc: stable@...r.kernel.org
> Fixes: c46a74ff05c0 ("gpio: add support for FTDI's MPSSE as GPIO")
> Signed-off-by: Abdun Nihaal <nihaal@....iitm.ac.in>
> ---
> Compile tested only. Issue found using static analysis.
>
Hi!
The same should be done when the driver is unbound. Can you simplify
your patch by using devm_add_action_or_reset() instead? That way you
avoid all the gotos.
Bart
Powered by blists - more mailing lists