Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc9fd77c authored by Tomi Valkeinen's avatar Tomi Valkeinen
Browse files

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
Loading
Loading
Loading
Loading
+7 −0
Original line number Original line Diff line number Diff line
@@ -262,6 +262,9 @@ static int dvic_probe_pdata(struct platform_device *pdev)


	in = omap_dss_find_output(pdata->source);
	in = omap_dss_find_output(pdata->source);
	if (in == NULL) {
	if (in == NULL) {
		if (ddata->i2c_adapter)
			i2c_put_adapter(ddata->i2c_adapter);

		dev_err(&pdev->dev, "Failed to find video source\n");
		dev_err(&pdev->dev, "Failed to find video source\n");
		return -ENODEV;
		return -ENODEV;
	}
	}
@@ -313,6 +316,10 @@ static int dvic_probe(struct platform_device *pdev)


err_reg:
err_reg:
	omap_dss_put_device(ddata->in);
	omap_dss_put_device(ddata->in);

	if (ddata->i2c_adapter)
		i2c_put_adapter(ddata->i2c_adapter);

	return r;
	return r;
}
}