diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-10-18 10:46:33 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-10-29 13:36:17 +0200 |
commit | cc9fd77c08940c869cdfa38442f32458c5be900c (patch) | |
tree | 98f5c55d72169abbca6b9c6186615dc6b5186bed /drivers | |
parent | 477fed70295dd7597b258cd509abac56c2081527 (diff) | |
download | linux-stable-cc9fd77c08940c869cdfa38442f32458c5be900c.tar.gz linux-stable-cc9fd77c08940c869cdfa38442f32458c5be900c.tar.bz2 linux-stable-cc9fd77c08940c869cdfa38442f32458c5be900c.zip |
OMAPDSS: connector-dvi: fix releasing i2c_adapter
i2c adapter is not released correctly on error paths. Fix this.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/omap2/displays-new/connector-dvi.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/video/omap2/displays-new/connector-dvi.c b/drivers/video/omap2/displays-new/connector-dvi.c index bc5f8ceda371..5641a23b78d1 100644 --- a/drivers/video/omap2/displays-new/connector-dvi.c +++ b/drivers/video/omap2/displays-new/connector-dvi.c @@ -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; } |