]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PCI: Drop pci_device_remove() test of pci_dev->driver
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Mon, 4 Oct 2021 12:59:25 +0000 (14:59 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 13 Apr 2024 10:58:21 +0000 (12:58 +0200)
commit39f7310eaa79574b51d0e479d2bf844d50dbb2c2
treed78cc4a3e121536f261f17c6c67783bccf8c8af5
parentd2a9709728004a0a18a056081d8b4771783cfae1
PCI: Drop pci_device_remove() test of pci_dev->driver

[ Upstream commit 097d9d414433315122f759ee6c2d8a7417a8ff0f ]

When the driver core calls pci_device_remove(), there is a driver bound
to the device, so pci_dev->driver is never NULL.

Remove the unnecessary test of pci_dev->driver.

Link: https://lore.kernel.org/r/20211004125935.2300113-2-u.kleine-koenig@pengutronix.de
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Stable-dep-of: 9d5286d4e7f6 ("PCI/PM: Drain runtime-idle callbacks before driver removal")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/pci/pci-driver.c