]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: hv: Fix return value check in hv_pci_assign_slots()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 21 Sep 2018 02:53:17 +0000 (02:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 22 Sep 2018 02:13:22 +0000 (19:13 -0700)
commit92a94c3076ca6d60f3a6ca388dc08a8d59177569
treece0ecc3379ae8c477897f76a61111aae4c6a5a26
parent1be8b2b5b18c6fce2224af01480d0f925efe0d50
PCI: hv: Fix return value check in hv_pci_assign_slots()

In case of error, the function pci_create_slot() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

Fixes: 9a7f105ae71d ("PCI: hv: support reporting serial number as slot information")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/pci/controller/pci-hyperv.c