linux/drivers/usb
Lin Yi 2908b076f5 USB: serial: mos7720: fix mos_parport refcount imbalance on error path
The write_parport_reg_nonblock() helper takes a reference to the struct
mos_parport, but failed to release it in a couple of error paths after
allocation failures, leading to a memory leak.

Johan said that move the kref_get() and mos_parport assignment to the
end of urbtrack initialisation is a better way, so move it. and
mos_parport do not used until urbtrack initialisation.

Signed-off-by: Lin Yi <teroincn@163.com>
Fixes: b69578df7e ("USB: usbserial: mos7720: add support for parallel port on moschip 7715")
Cc: stable <stable@vger.kernel.org>     # 2.6.35
Signed-off-by: Johan Hovold <johan@kernel.org>
2019-03-20 13:58:42 +01:00
..
atm USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
c67x00
chipidea usb: chipidea: Refactor USB PHY selection and keep a single PHY 2019-02-27 15:51:02 +01:00
class cdc-wdm: pass return value of recover_from_urb_loss 2019-02-19 14:41:38 +01:00
common usb: roles: Add a description for the class to Kconfig 2018-12-17 14:07:59 +01:00
core USB/PHY patches for 5.1-rc1 2019-03-06 16:48:27 -08:00
dwc2 usb: dwc2: use struct_size() in kzalloc() 2019-02-19 14:41:38 +01:00
dwc3 usb: dwc3: drd: Defer probe if extcon device is not found 2019-02-19 15:08:07 +01:00
early memblock: drop memblock_alloc_*_nopanic() variants 2019-03-12 10:04:02 -07:00
gadget SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
host DMA mapping updates for 5.1 2019-03-10 11:54:48 -07:00
image USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
isp1760 USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
misc USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
mon USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
mtu3 USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
musb USB: musb: mark expected switch fall-through 2019-02-13 19:40:20 +01:00
phy USB: changes for v5.1 merge window 2019-02-15 09:08:57 +01:00
renesas_usbhs USB: renesas_usbhs: fix spelling mistake "doens't" -> "doesn't" 2019-02-19 14:41:38 +01:00
roles usb: roles: Find the muxes by also matching against the device node 2019-02-14 10:52:25 +01:00
serial USB: serial: mos7720: fix mos_parport refcount imbalance on error path 2019-03-20 13:58:42 +01:00
storage SCSI misc on 20190306 2019-03-09 16:53:47 -08:00
typec usb: typec: tps6598x: handle block writes separately with plain-I2C adapters 2019-02-21 10:54:23 +01:00
usbip usbip: Fix vep_free_request() null pointer checks on input args 2019-01-30 09:22:35 +01:00
wusbcore wusb: Remove unnecessary static function ckhdid_printf 2019-03-01 20:53:41 +01:00
Kconfig USB: add missing SPDX lines to Kconfig and Makefiles 2019-01-22 09:08:17 +01:00
Makefile
usb-skeleton.c usb: usb-skeleton: use irqsave() in USB's complete callback 2018-06-28 19:36:06 +09:00