From: Greg KH <gregkh@linuxfoundation.org>
To: Salah Triki <salah.triki@gmail.com>
Cc: Marcus Folkesson <marcus.folkesson@gmail.com>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] input: joystick: pxrc: use usb_get_intf()
Date: Sun, 25 Jul 2021 08:31:47 +0200 [thread overview]
Message-ID: <YP0FU1jMuhcy6wLu@kroah.com> (raw)
In-Reply-To: <20210724213617.GA586795@pc>
On Sat, Jul 24, 2021 at 10:36:17PM +0100, Salah Triki wrote:
> Use usb_get_intf() in order to increment reference count of the usb
> interface structure.
>
> Signed-off-by: Salah Triki <salah.triki@gmail.com>
> ---
> drivers/input/joystick/pxrc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/joystick/pxrc.c b/drivers/input/joystick/pxrc.c
> index ea2bf5951d67..59304352548b 100644
> --- a/drivers/input/joystick/pxrc.c
> +++ b/drivers/input/joystick/pxrc.c
> @@ -143,7 +143,7 @@ static int pxrc_probe(struct usb_interface *intf,
> return -ENOMEM;
>
> mutex_init(&pxrc->pm_mutex);
> - pxrc->intf = intf;
> + pxrc->intf = usb_get_intf(intf);
>
> usb_set_intfdata(pxrc->intf, pxrc);
>
> --
You can not add a reference and never drop it :(
next prev parent reply other threads:[~2021-07-25 6:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-24 21:36 [PATCH] input: joystick: pxrc: use usb_get_intf() Salah Triki
2021-07-25 6:31 ` Greg KH [this message]
2021-07-25 18:00 ` Dmitry Torokhov
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=YP0FU1jMuhcy6wLu@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=dmitry.torokhov@gmail.com \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcus.folkesson@gmail.com \
--cc=salah.triki@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