]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call
authorMiaoqian Lin <linmq006@gmail.com>
Wed, 3 Sep 2025 14:16:13 +0000 (22:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 10:04:23 +0000 (12:04 +0200)
commit534be87a958b008e7ee1182acbd73d9dcf4f3849
tree1a685070555386c4f2a687264883ed7cc1d4544d
parent8d5f3bbc03d1768dc5f3090484bc82da32f6d80f
usb: cdns3: cdnsp-pci: remove redundant pci_disable_device() call

commit e9c206324eeb213957a567a9d066bdeb355c7491 upstream.

The cdnsp-pci driver uses pcim_enable_device() to enable a PCI device,
which means the device will be automatically disabled on driver detach
through the managed device framework. The manual pci_disable_device()
call in the error path is therefore redundant.

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

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Link: https://lore.kernel.org/r/20250903141613.2535472-1-linmq006@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdnsp-pci.c