lkml.org 
[lkml]   [2021]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] tablet: acecad: update the reference count of the usb interface structure
On Sat, Jul 31, 2021 at 05:09:38PM +0100, Salah Triki wrote:
> drivers/input/tablet/acecad.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/tablet/acecad.c b/drivers/input/tablet/acecad.c
> index a38d1fe97334..85fe134a30ee 100644
> --- a/drivers/input/tablet/acecad.c
> +++ b/drivers/input/tablet/acecad.c
> @@ -151,7 +151,7 @@ static int usb_acecad_probe(struct usb_interface *intf, const struct usb_device_
> goto fail2;
> }
>
> - acecad->intf = intf;
> + acecad->intf = usb_get_intf(intf);
> acecad->input = input_dev;
>
> if (dev->manufacturer)

As I mentioned earlier, you need to drop the reference if
input_register_device() fails.

regards,
dan carpenter


\
 
 \ /
  Last update: 2021-08-04 12:59    [W:0.057 / U:0.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site