From dc50eab76b709d68175a358d6e23a5a3890764d3 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 18 May 2024 19:39:57 +0200 Subject: Merging upstream version 6.7.7. Signed-off-by: Daniel Baumann --- drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c') diff --git a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c index 343288b027..a5e8818517 100644 --- a/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c +++ b/drivers/infiniband/hw/vmw_pvrdma/pvrdma_main.c @@ -1021,10 +1021,8 @@ err_free_intrs: pvrdma_free_irq(dev); pci_free_irq_vectors(pdev); err_free_cq_ring: - if (dev->netdev) { - dev_put(dev->netdev); - dev->netdev = NULL; - } + dev_put(dev->netdev); + dev->netdev = NULL; pvrdma_page_dir_cleanup(dev, &dev->cq_pdir); err_free_async_ring: pvrdma_page_dir_cleanup(dev, &dev->async_pdir); @@ -1064,10 +1062,8 @@ static void pvrdma_pci_remove(struct pci_dev *pdev) flush_workqueue(event_wq); - if (dev->netdev) { - dev_put(dev->netdev); - dev->netdev = NULL; - } + dev_put(dev->netdev); + dev->netdev = NULL; /* Unregister ib device */ ib_unregister_device(&dev->ib_dev); -- cgit v1.2.3