lkml.org 
[lkml]   [2021]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] input: joystick: pxrc: use usb_get_intf()
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);

--
2.25.1
\
 
 \ /
  Last update: 2021-07-24 23:36    [W:0.070 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site