From: Sylwester Nawrocki Date: Thu, 16 Aug 2012 14:15:00 +0000 (-0300) Subject: [media] m5mols: Add missing free_irq() on error path X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=9064cb5e03b1502782d314b03ea3cbe09992f9a7;p=openwrt%2Fstaging%2Fblogic.git [media] m5mols: Add missing free_irq() on error path Make sure the interrupt is freed when driver probing fails. Reported-by: Marek Szyprowski Cc: HeungJun Kim Signed-off-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/i2c/m5mols/m5mols_core.c b/drivers/media/i2c/m5mols/m5mols_core.c index 0f521f57e8e5..6ca6a7f9de15 100644 --- a/drivers/media/i2c/m5mols/m5mols_core.c +++ b/drivers/media/i2c/m5mols/m5mols_core.c @@ -931,7 +931,7 @@ static int __devinit m5mols_probe(struct i2c_client *client, ret = m5mols_sensor_power(info, true); if (ret) - goto out_me; + goto out_irq; ret = m5mols_fw_start(sd); if (!ret) @@ -940,6 +940,8 @@ static int __devinit m5mols_probe(struct i2c_client *client, ret = m5mols_sensor_power(info, false); if (!ret) return 0; +out_irq: + free_irq(client->irq, sd); out_me: media_entity_cleanup(&sd->entity); out_reg: