Skip to content

Commit

Permalink
OMAPDSS: connector-dvi: fix releasing i2c_adapter
Browse files Browse the repository at this point in the history
i2c adapter is not released correctly on error paths. Fix this.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Tomi Valkeinen committed Oct 29, 2013
1 parent 477fed7 commit cc9fd77
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/video/omap2/displays-new/connector-dvi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit cc9fd77

Please sign in to comment.