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

Commit bc500d6e authored by Markus Elfring's avatar Markus Elfring Committed by Tomi Valkeinen
Browse files

video: fbdev-OMAP2: Deletion of unnecessary checks before the function call "i2c_put_adapter"



The i2c_put_adapter() function tests whether its argument is NULL
and then returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 6049a7a2
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -262,7 +262,6 @@ 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");
@@ -352,7 +351,6 @@ 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;
@@ -371,7 +369,6 @@ static int __exit dvic_remove(struct platform_device *pdev)

	omap_dss_put_device(in);

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

	return 0;