re: staging: comedi: me_daq: store the pci_dev in the comedi_device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello H Hartley Sweeten,

This is a semi-automatic email about new static checker warnings.

The patch 27034e8ace5a: "staging: comedi: me_daq: store the pci_dev 
in the comedi_device" from Jul 18, 2012, leads to the following 
Smatch complaint:

drivers/staging/comedi/drivers/me_daq.c:797 me_detach()
	 error: we previously assumed 'dev_private' could be null (see line 788)

drivers/staging/comedi/drivers/me_daq.c
   787	
   788		if (dev_private) {
                    ^^^^^^^^^^^
Old check.

   789			if (dev_private->me_regbase) {
   790				me_reset(dev);
   791				iounmap(dev_private->me_regbase);
   792			}
   793			if (dev_private->plx_regbase)
   794				iounmap(dev_private->plx_regbase);
   795		}
   796		if (pcidev) {
   797			if (dev_private->plx_regbase_size)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This dereference was previously under the check but the patch moves it
outside.

   798				comedi_pci_disable(pcidev);
   799			pci_dev_put(pcidev);

regards,
dan carpenter

See also:
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux