Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Axel Lin and committed by
Linus Torvalds
b89d5f17 c53252b7

+2 -2
+2 -2
drivers/misc/fsa9480.c
··· 455 455 456 456 fail2: 457 457 if (client->irq) 458 - free_irq(client->irq, NULL); 458 + free_irq(client->irq, usbsw); 459 459 fail1: 460 460 i2c_set_clientdata(client, NULL); 461 461 kfree(usbsw); ··· 466 466 { 467 467 struct fsa9480_usbsw *usbsw = i2c_get_clientdata(client); 468 468 if (client->irq) 469 - free_irq(client->irq, NULL); 469 + free_irq(client->irq, usbsw); 470 470 i2c_set_clientdata(client, NULL); 471 471 472 472 sysfs_remove_group(&client->dev.kobj, &fsa9480_group);