Commit 9064cb5e authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] m5mols: Add missing free_irq() on error path

Make sure the interrupt is freed when driver probing fails.
Reported-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Cc: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent bbc5296f
......@@ -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:
......
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