Skip to content

Commit

Permalink
[media] m5mols: Add missing free_irq() on error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Oct 1, 2012
1 parent bbc5296 commit 9064cb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/i2c/m5mols/m5mols_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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:
Expand Down

0 comments on commit 9064cb5

Please sign in to comment.