1
0
Fork 0
alistair23-linux/drivers/usb
Eugeniu Rosca c8137e78b8 usb: core: port: do error out if usb_autopm_get_interface() fails
commit 1f8b39bc99 upstream.

Reviewing a fresh portion of coverity defects in USB core
(specifically CID 1458999), Alan Stern noted below in [1]:

On Tue, Feb 25, 2020 at 02:39:23PM -0500, Alan Stern wrote:
 > A revised search finds line 997 in drivers/usb/core/hub.c and lines
 > 216, 269 in drivers/usb/core/port.c.  (I didn't try looking in any
 > other directories.)  AFAICT all three of these should check the
 > return value, although a error message in the kernel log probably
 > isn't needed.

Factor out the usb_port_runtime_{resume,suspend}() changes into a
standalone patch to allow conflict-free porting on top of stable v3.9+.

[1] https://lore.kernel.org/lkml/Pine.LNX.4.44L0.2002251419120.1485-100000@iolanthe.rowland.org

Fixes: 971fcd492c ("usb: add runtime pm support for usb port device")
Cc: stable@vger.kernel.org # v3.9+
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20200226175036.14946-3-erosca@de.adit-jv.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-12 13:00:19 +01:00
..
atm USB: atm: ueagle-atm: add missing endpoint check 2019-12-17 19:55:44 +01:00
c67x00 USB: add SPDX identifiers to all remaining Makefiles 2017-11-07 15:53:48 +01:00
cdns3 usb: cdns3: gadget: toggle cycle bit before reset endpoint 2020-03-12 13:00:18 +01:00
chipidea usb: chipidea: host: Disable port power only if previously enabled 2020-01-14 20:08:19 +01:00
class USB: usblp: fix use-after-free on disconnect 2019-10-15 20:19:19 +02:00
common usb: common: usb-conn-gpio: Don't log an error on probe deferral 2019-12-17 19:55:39 +01:00
core usb: core: port: do error out if usb_autopm_get_interface() fails 2020-03-12 13:00:19 +01:00
dwc2 usb: dwc2: Fix in ISOC request length checking 2020-02-28 17:22:26 +01:00
dwc3 usb: dwc3: gadget: Update chain bit correctly when using sg list 2020-03-12 13:00:18 +01:00
early drivers: Remove explicit invocations of mmiowb() 2019-04-08 12:01:02 +01:00
gadget usb: gadget: serial: fix Tx stall after buffer overflow 2020-03-12 13:00:10 +01:00
host usb: host: xhci: update event ring dequeue pointer on purpose 2020-02-28 17:22:15 +01:00
image USB: microtek: fix info-leak at probe 2019-10-04 11:02:58 +02:00
isp1760 usb: add a HCD_DMA flag instead of guestimating DMA capabilities 2019-08-21 10:03:35 -07:00
misc USB: misc: iowarrior: add support for the 100 device 2020-02-28 17:22:14 +01:00
mon usb: mon: Fix a deadlock in usbmon between mmap and read 2019-12-17 19:55:49 +01:00
mtu3 usb: mtu3: fix missing include of mtu3_dr.h 2019-10-27 08:58:44 +02:00
musb usb: musb: omap2430: Get rid of musb .set_vbus for omap2430 glue 2020-02-24 08:36:49 +01:00
phy USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
renesas_usbhs usb: renesas_usbhs: add suspend event support in gadget mode 2019-12-31 16:43:37 +01:00
roles usb: roles: fix a potential use after free 2019-12-17 19:55:46 +01:00
serial USB: serial: ir-usb: fix IrLAP framing 2020-02-01 09:34:32 +00:00
storage usb: storage: Add quirk for Samsung Fit flash 2020-03-12 13:00:18 +01:00
typec usb: typec: tcpci: mask event interrupts when remove driver 2020-02-11 04:35:10 -08:00
usbip usbip: Fix error path of vhci_recv_ret_submit() 2019-12-31 16:46:05 +01:00
Kconfig usb: common: create Kconfig file 2019-09-03 19:00:39 +02:00
Makefile USB: Changes for v5.4 merge window 2019-09-02 19:20:57 +02:00
usb-skeleton.c USB: usb-skeleton: drop redundant in-urb check 2019-10-10 12:41:19 +02:00