Commit b89d5f17 authored by Axel Lin's avatar Axel Lin Committed by Linus Torvalds

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: default avatarAxel 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c53252b7
...@@ -455,7 +455,7 @@ static int __devinit fsa9480_probe(struct i2c_client *client, ...@@ -455,7 +455,7 @@ static int __devinit fsa9480_probe(struct i2c_client *client,
fail2: fail2:
if (client->irq) if (client->irq)
free_irq(client->irq, NULL); free_irq(client->irq, usbsw);
fail1: fail1:
i2c_set_clientdata(client, NULL); i2c_set_clientdata(client, NULL);
kfree(usbsw); kfree(usbsw);
...@@ -466,7 +466,7 @@ static int __devexit fsa9480_remove(struct i2c_client *client) ...@@ -466,7 +466,7 @@ static int __devexit fsa9480_remove(struct i2c_client *client)
{ {
struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client);
if (client->irq) if (client->irq)
free_irq(client->irq, NULL); free_irq(client->irq, usbsw);
i2c_set_clientdata(client, NULL); i2c_set_clientdata(client, NULL);
sysfs_remove_group(&client->dev.kobj, &fsa9480_group); sysfs_remove_group(&client->dev.kobj, &fsa9480_group);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment