Commit cc9fd77c authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: connector-dvi: fix releasing i2c_adapter

i2c adapter is not released correctly on error paths. Fix this.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 477fed70
......@@ -262,6 +262,9 @@ static int dvic_probe_pdata(struct platform_device *pdev)
in = omap_dss_find_output(pdata->source);
if (in == NULL) {
if (ddata->i2c_adapter)
i2c_put_adapter(ddata->i2c_adapter);
dev_err(&pdev->dev, "Failed to find video source\n");
return -ENODEV;
}
......@@ -313,6 +316,10 @@ static int dvic_probe(struct platform_device *pdev)
err_reg:
omap_dss_put_device(ddata->in);
if (ddata->i2c_adapter)
i2c_put_adapter(ddata->i2c_adapter);
return r;
}
......
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