From 3255ccd26de5af07a943098f19bbee8ca60cff2f Mon Sep 17 00:00:00 2001 From: gammadj19 <143666214+gammadj19@users.noreply.github.com> Date: Thu, 31 Aug 2023 09:26:37 +0900 Subject: [PATCH] Fix dereferencing the free'd oct_dev pointer. --- drivers/phc/ep_phc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/phc/ep_phc.c b/drivers/phc/ep_phc.c index 3776bba..31a74dd 100644 --- a/drivers/phc/ep_phc.c +++ b/drivers/phc/ep_phc.c @@ -633,7 +633,6 @@ void octeon_ep_phc_remove(struct pci_dev *pdev) oct_idx); schedule_timeout_interruptible(HZ * 1); } - goto before_exit; } atomic_set(&oct_dev->status, OCT_DEV_STOPPING); @@ -666,9 +665,6 @@ void octeon_ep_phc_remove(struct pci_dev *pdev) * data structure to reflect this. Free the device structure. */ octeon_free_device_mem(oct_dev); - -before_exit: - dev_info(&oct_dev->pci_dev->dev, "OCT_PHC[%d]: Octeon device removed\n", oct_idx); }