Skip to content

Commit

Permalink
drivers/misc/fsa9480.c: fix a leak of the IRQ during init failure
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
AxelLin authored and torvalds committed Aug 25, 2011
1 parent c53252b commit b89d5f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/misc/fsa9480.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down

0 comments on commit b89d5f1

Please sign in to comment.