The function pci_dev_put checks whether its argument is NULL and returns
immediately. Therefore, NULL test before the call if not needed.
Found using coccinelle:
@@
expression x;
@@
- if(x)
- pci_dev_put(x);
+ pci_dev_put(x);
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
pci9118_reset(dev);
comedi_pci_detach(dev);
pci9118_free_dma(dev);
- if (pcidev)
- pci_dev_put(pcidev);
+ pci_dev_put(pcidev);
}
static struct comedi_driver adl_pci9118_driver = {