]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: cdns3: Fix double resource release in cdns3_pci_probe
authorMiaoqian Lin <linmq006@gmail.com>
Sun, 26 Oct 2025 09:08:59 +0000 (17:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Dec 2025 21:12:43 +0000 (06:12 +0900)
commit28bde91efa511eeffdb1300262274830dfc018fc
treea18cfd1d5af53fc3421798682c66b23636c8944e
parent0dece48660be16918ecf2dbdc7193e8be03e1693
usb: cdns3: Fix double resource release in cdns3_pci_probe

commit 1ec39d2cd88dac2e7cdbac248762f1f057971c5d upstream.

The driver uses pcim_enable_device() to enable the PCI device,
the device will be automatically disabled on driver detach through
the managed device framework. The manual pci_disable_device() calls
in the error paths are therefore redundant and should be removed.

Found via static anlaysis and this is similar to commit 99ca0b57e49f
("thermal: intel: int340x: processor: Fix warning during module unload").

Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Cc: stable <stable@kernel.org>
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://patch.msgid.link/20251026090859.33107-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdns3-pci-wrap.c