aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2011-08-25 15:59:19 -0700
committerLinus Torvalds <[email protected]>2011-08-25 16:25:35 -0700
commitb89d5f17d4b02ae9f3a691c2cb260e1929c6261b (patch)
tree0046168d316ba49ce628061244229f6e157524f8
parentc53252b780e26c73c6a4e40bc14179447504cccd (diff)
drivers/misc/fsa9480.c: fix a leak of the IRQ during init failure
Make sure we are passing the same cookie in all calls to request_threaded_irq() and free_irq(). Signed-off-by: Axel Lin <[email protected]> Cc: Donggeun Kim <[email protected]> Cc: Minkyu Kang <[email protected]> Cc: Kyungmin Park <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--drivers/misc/fsa9480.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/fsa9480.c b/drivers/misc/fsa9480.c
index 5325a7e70dcf..27dc0d21aafa 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);