diff mbox series

[net] net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()

Message ID 20221024131338.2848959-1-yangyingliang@huawei.com (mailing list archive)
State Accepted
Commit 5da6d65590a0698199df44d095e54b0ed1708178
Delegated to: Netdev Maintainers
Headers show
Series [net] net: ksz884x: fix missing pci_disable_device() on error in pcidev_init() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 39 this patch: 39
netdev/cc_maintainers warning 8 maintainers not CCed: shayagr@amazon.com mw@semihalf.com geoff@infradead.org wudaemon@163.com wsa+renesas@sang-engineering.com edumazet@google.com chenhao288@hisilicon.com pabeni@redhat.com
netdev/build_clang success Errors and warnings before: 37 this patch: 37
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 39 this patch: 39
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Yang Yingliang Oct. 24, 2022, 1:13 p.m. UTC
pci_disable_device() need be called while module exiting, switch to use
pcim_enable(), pci_disable_device() will be called in pcim_release()
while unbinding device.

Fixes: 8ca86fd83eae ("net: Micrel KSZ8841/2 PCI Ethernet driver")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/net/ethernet/micrel/ksz884x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 26, 2022, 3 a.m. UTC | #1
Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Mon, 24 Oct 2022 21:13:38 +0800 you wrote:
> pci_disable_device() need be called while module exiting, switch to use
> pcim_enable(), pci_disable_device() will be called in pcim_release()
> while unbinding device.
> 
> Fixes: 8ca86fd83eae ("net: Micrel KSZ8841/2 PCI Ethernet driver")
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> 
> [...]

Here is the summary with links:
  - [net] net: ksz884x: fix missing pci_disable_device() on error in pcidev_init()
    https://git.kernel.org/netdev/net/c/5da6d65590a0

You are awesome, thank you!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c
index 468520079c65..e6acd1e7b263 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -6851,7 +6851,7 @@  static int pcidev_init(struct pci_dev *pdev, const struct pci_device_id *id)
 	char banner[sizeof(version)];
 	struct ksz_switch *sw = NULL;
 
-	result = pci_enable_device(pdev);
+	result = pcim_enable_device(pdev);
 	if (result)
 		return result;