]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: pciehp: Drop unnecessary NULL pointer check
authorLukas Wunner <lukas@wunner.de>
Thu, 19 Jul 2018 22:27:35 +0000 (17:27 -0500)
committerBjorn Helgaas <helgaas@kernel.org>
Mon, 23 Jul 2018 22:04:11 +0000 (17:04 -0500)
commit7a9da6118ae6ffa251d9ef5c218f525af6afb20c
treee27984838abbdba625e7e0342ab16884c1ebb404
parent57e9fe9ca43dc0f5f510af96923d1183315c6fd7
PCI: pciehp: Drop unnecessary NULL pointer check

pciehp_disable_slot() checks if the ctrl attribute of the slot is NULL
and bails out if so.  However the function is not called prior to the
attribute being set in pcie_init_slot(), and pcie_init_slot() is not
called if ctrl is NULL.  So the check is unnecessary.  Drop it.

It has been present ever since the driver was introduced in 2004, but it
was already unnecessary back then:
https://git.kernel.org/tglx/history/c/c16b4b14d980

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/hotplug/pciehp_ctrl.c