diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-08-25 18:59:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-25 19:25:35 -0400 |
commit | b89d5f17d4b02ae9f3a691c2cb260e1929c6261b (patch) | |
tree | 0046168d316ba49ce628061244229f6e157524f8 /drivers/misc/fsa9480.c | |
parent | c53252b780e26c73c6a4e40bc14179447504cccd (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 <axel.lin@gmail.com>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/misc/fsa9480.c')
-rw-r--r-- | 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 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, | |||
455 | 455 | ||
456 | fail2: | 456 | fail2: |
457 | if (client->irq) | 457 | if (client->irq) |
458 | free_irq(client->irq, NULL); | 458 | free_irq(client->irq, usbsw); |
459 | fail1: | 459 | fail1: |
460 | i2c_set_clientdata(client, NULL); | 460 | i2c_set_clientdata(client, NULL); |
461 | kfree(usbsw); | 461 | kfree(usbsw); |
@@ -466,7 +466,7 @@ static int __devexit fsa9480_remove(struct i2c_client *client) | |||
466 | { | 466 | { |
467 | struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); | 467 | struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); |
468 | if (client->irq) | 468 | if (client->irq) |
469 | free_irq(client->irq, NULL); | 469 | free_irq(client->irq, usbsw); |
470 | i2c_set_clientdata(client, NULL); | 470 | i2c_set_clientdata(client, NULL); |
471 | 471 | ||
472 | sysfs_remove_group(&client->dev.kobj, &fsa9480_group); | 472 | sysfs_remove_group(&client->dev.kobj, &fsa9480_group); |