aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-09 03:16:46 -0500
committerWolfram Sang <wsa@the-dreams.de>2013-04-02 01:06:03 -0400
commitbf51a8c5e0b6133b929eb7d7456e99a605f8168c (patch)
tree5b592f4c92618ae074af18afee0ff1ad269177d3 /drivers/gpu/drm/gma500
parentf5fb0822957b914ab7022cc4bfe000ec3bc9c82c (diff)
i2c: Ignore return value of i2c_del_adapter()
i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/gpu/drm/gma500')
-rw-r--r--drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
index 88627e3ba1e3..1eb86c79523e 100644
--- a/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
+++ b/drivers/gpu/drm/gma500/oaktrail_hdmi_i2c.c
@@ -319,8 +319,7 @@ void oaktrail_hdmi_i2c_exit(struct pci_dev *dev)
319 struct hdmi_i2c_dev *i2c_dev; 319 struct hdmi_i2c_dev *i2c_dev;
320 320
321 hdmi_dev = pci_get_drvdata(dev); 321 hdmi_dev = pci_get_drvdata(dev);
322 if (i2c_del_adapter(&oaktrail_hdmi_i2c_adapter)) 322 i2c_del_adapter(&oaktrail_hdmi_i2c_adapter);
323 DRM_DEBUG_DRIVER("Failed to delete hdmi-i2c adapter\n");
324 323
325 i2c_dev = hdmi_dev->i2c_dev; 324 i2c_dev = hdmi_dev->i2c_dev;
326 kfree(i2c_dev); 325 kfree(i2c_dev);