diff mbox series

atm: horizon: Fix irq release error

Message ID 5fc117e8337d03c5bb964de50d000a9ca710c304.1510646818.git.arvind.yadav.cs@gmail.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series atm: horizon: Fix irq release error | expand

Commit Message

Arvind Yadav Nov. 14, 2017, 8:12 a.m. UTC
atm_dev_register() can fail here and passed parameters to free irq
which is not initialised. Initialization of 'dev->irq' happened after
the 'goto out_free_irq'. So using 'irq' insted of 'dev->irq' in
free_irq().

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/atm/horizon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller Nov. 14, 2017, 1:04 p.m. UTC | #1
From: Arvind Yadav <arvind.yadav.cs@gmail.com>
Date: Tue, 14 Nov 2017 13:42:38 +0530

> atm_dev_register() can fail here and passed parameters to free irq
> which is not initialised. Initialization of 'dev->irq' happened after
> the 'goto out_free_irq'. So using 'irq' insted of 'dev->irq' in
> free_irq().
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Applied.
diff mbox series

Patch

diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c
index 7e76b35..e121b84 100644
--- a/drivers/atm/horizon.c
+++ b/drivers/atm/horizon.c
@@ -2803,7 +2803,7 @@  static int hrz_probe(struct pci_dev *pci_dev,
 	return err;
 
 out_free_irq:
-	free_irq(dev->irq, dev);
+	free_irq(irq, dev);
 out_free:
 	kfree(dev);
 out_release: