atm: horizon: Fix irq release error
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 14 Nov 2017 08:12:38 +0000 (13:42 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Dec 2017 08:53:13 +0000 (09:53 +0100)
[ Upstream commit bde533f2ea607cbbbe76ef8738b36243939a7bc2 ]

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>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/atm/horizon.c

index 7e76b35f422c62a8d2de5074b55d76734cc420b3..e121b84857310836742690c001dec6502dc68db2 100644 (file)
@@ -2803,7 +2803,7 @@ out:
        return err;
 
 out_free_irq:
-       free_irq(dev->irq, dev);
+       free_irq(irq, dev);
 out_free:
        kfree(dev);
 out_release: