提交 bc500d6e 编写于 作者: M Markus Elfring 提交者: Tomi Valkeinen

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NTomi Valkeinen <tomi.valkeinen@ti.com>
上级 6049a7a2
...@@ -262,8 +262,7 @@ static int dvic_probe_pdata(struct platform_device *pdev) ...@@ -262,8 +262,7 @@ 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);
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 -EPROBE_DEFER; return -EPROBE_DEFER;
...@@ -352,8 +351,7 @@ static int dvic_probe(struct platform_device *pdev) ...@@ -352,8 +351,7 @@ 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);
i2c_put_adapter(ddata->i2c_adapter);
return r; return r;
} }
...@@ -371,8 +369,7 @@ static int __exit dvic_remove(struct platform_device *pdev) ...@@ -371,8 +369,7 @@ static int __exit dvic_remove(struct platform_device *pdev)
omap_dss_put_device(in); omap_dss_put_device(in);
if (ddata->i2c_adapter) i2c_put_adapter(ddata->i2c_adapter);
i2c_put_adapter(ddata->i2c_adapter);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册