diff options
author | Markus Elfring <elfring@users.sourceforge.net> | 2014-11-23 14:07:22 +0100 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-12-04 16:16:01 +0200 |
commit | bc500d6ed9e2f56a01a7a59d5366d4526111ba1e (patch) | |
tree | 5edc0cca3d804d710c3654421f575bd5d5c3a2e5 /drivers/video | |
parent | 6049a7a2535bf0b5021b527e60dee9eda022bc90 (diff) | |
download | linux-bc500d6ed9e2f56a01a7a59d5366d4526111ba1e.tar.bz2 |
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: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/omap2/displays-new/connector-dvi.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/video/fbdev/omap2/displays-new/connector-dvi.c b/drivers/video/fbdev/omap2/displays-new/connector-dvi.c index 2dfb6e5ff0cc..3d38e478bc64 100644 --- a/drivers/video/fbdev/omap2/displays-new/connector-dvi.c +++ b/drivers/video/fbdev/omap2/displays-new/connector-dvi.c @@ -262,8 +262,7 @@ 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); + i2c_put_adapter(ddata->i2c_adapter); dev_err(&pdev->dev, "Failed to find video source\n"); return -EPROBE_DEFER; @@ -352,8 +351,7 @@ 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); + i2c_put_adapter(ddata->i2c_adapter); return r; } @@ -371,8 +369,7 @@ static int __exit dvic_remove(struct platform_device *pdev) omap_dss_put_device(in); - if (ddata->i2c_adapter) - i2c_put_adapter(ddata->i2c_adapter); + i2c_put_adapter(ddata->i2c_adapter); return 0; } |