summaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorSylwester Nawrocki <s.nawrocki@samsung.com>2012-08-16 11:15:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-10-01 14:56:15 -0300
commit9064cb5e03b1502782d314b03ea3cbe09992f9a7 (patch)
treea72ae625ad854c238d7d52031ac6b56a30a866ed /drivers/media/i2c
parentbbc5296f20570756ca437587325c785a2d96ea96 (diff)
downloadlinux-9064cb5e03b1502782d314b03ea3cbe09992f9a7.tar.bz2
[media] m5mols: Add missing free_irq() on error path
Make sure the interrupt is freed when driver probing fails. Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Cc: HeungJun Kim <riverful.kim@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/m5mols/m5mols_core.c4
1 files changed, 3 insertions, 1 deletions
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: