Re: [PATCH] usb/usbtmc: Remove a redundant kref_put in usbtmc_disconnect

2021-03-12 Thread Greg KH
On Thu, Mar 11, 2021 at 07:03:54AM -0800, Lv Yunlong wrote: > In the implementation of usbtmc_free_int(), it already calls > kref_put() to free the data as shown below. So, in > usbtmc_disconnect, call an extra kref_put() is redundant. > > """ > static void usbtmc_free_int(struct usbtmc_device_dat

[PATCH] usb/usbtmc: Remove a redundant kref_put in usbtmc_disconnect

2021-03-11 Thread Lv Yunlong
In the implementation of usbtmc_free_int(), it already calls kref_put() to free the data as shown below. So, in usbtmc_disconnect, call an extra kref_put() is redundant. """ static void usbtmc_free_int(struct usbtmc_device_data *data) { if (!data->iin_ep_present || !data->iin_urb)