[PATCH] dm1105: remove unneeded not-null test

From: Alexandru Juncu
Date: Wed Sep 04 2013 - 10:42:24 EST


i2c_adap is a field of a struct and will always be allocated so
its address will never be null.

Suggested by coccinelle, manually verified.

Signed-off-by: Alexandru Juncu <alexj@xxxxxxxxxx>
---
drivers/media/pci/dm1105/dm1105.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index ab797fe..110a009 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -1202,8 +1202,7 @@ static void dm1105_remove(struct pci_dev *pdev)
dvb_dmxdev_release(&dev->dmxdev);
dvb_dmx_release(dvbdemux);
dvb_unregister_adapter(dvb_adapter);
- if (&dev->i2c_adap)
- i2c_del_adapter(&dev->i2c_adap);
+ i2c_del_adapter(&dev->i2c_adap);

dm1105_hw_exit(dev);
synchronize_irq(pdev->irq);
--
1.8.4.rc0.1.g8f6a3e5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/