public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/misc: fsa9480: fix a leak of the IRQ during init failure
@ 2011-07-28  9:38 Axel Lin
  0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2011-07-28  9:38 UTC (permalink / raw)
  To: linux-kernel; +Cc: Donggeun Kim, Minkyu Kang, Kyungmin Park, Andrew Morton

Make sure we are passing the same cookie in all calls to request_threaded_irq()
and free_irq().

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/misc/fsa9480.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c
index 5325a7e..27dc0d2 100644
--- a/drivers/misc/fsa9480.c
+++ b/drivers/misc/fsa9480.c
@@ -455,7 +455,7 @@ static int __devinit fsa9480_probe(struct i2c_client *client,
 
 fail2:
 	if (client->irq)
-		free_irq(client->irq, NULL);
+		free_irq(client->irq, usbsw);
 fail1:
 	i2c_set_clientdata(client, NULL);
 	kfree(usbsw);
@@ -466,7 +466,7 @@ static int __devexit fsa9480_remove(struct i2c_client *client)
 {
 	struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client);
 	if (client->irq)
-		free_irq(client->irq, NULL);
+		free_irq(client->irq, usbsw);
 	i2c_set_clientdata(client, NULL);
 
 	sysfs_remove_group(&client->dev.kobj, &fsa9480_group);
-- 
1.7.4.1




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-07-28  9:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-28  9:38 [PATCH] drivers/misc: fsa9480: fix a leak of the IRQ during init failure Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox