aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-ep0.c
diff options
context:
space:
mode:
authorMing Lei <[email protected]>2021-06-02 21:30:28 +0800
committerMartin K. Petersen <[email protected]>2021-06-07 22:12:44 -0400
commit11714026c02d613c30a149c3f4c4a15047744529 (patch)
tree4267dfc13013519844f4b21308a10608cf8bd9ef /drivers/usb/cdns3/cdns3-ep0.c
parent3719f4ff047e20062b8314c23ec3cab84d74c908 (diff)
scsi: core: Put .shost_dev in failure path if host state changes to RUNNING
scsi_host_dev_release() only frees dev_name when host state is SHOST_CREATED. After host state has changed to SHOST_RUNNING, scsi_host_dev_release() no longer cleans up. Fix this by doing a put_device(&shost->shost_dev) in the failure path when host state is SHOST_RUNNING. Move get_device(&shost->shost_gendev) before device_add(&shost->shost_dev) so that scsi_host_cls_release() can do a put on this reference. Link: https://lore.kernel.org/r/[email protected] Cc: Bart Van Assche <[email protected]> Cc: Hannes Reinecke <[email protected]> Reported-by: John Garry <[email protected]> Tested-by: John Garry <[email protected]> Reviewed-by: John Garry <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Signed-off-by: Ming Lei <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'drivers/usb/cdns3/cdns3-ep0.c')
0 files changed, 0 insertions, 0 deletions