Re: [PATCH 5/8] Staging: bcm: Change the style of comparing structures to null in InterfaceMisc.c.

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

 



On Thu, Oct 11, 2012 at 09:02:04PM -0400, Kevin McKinney wrote:
> @@ -193,7 +193,7 @@ VOID Bcm_kill_all_URBs(PS_INTERFACE_ADAPTER psIntfAdapter)
>  	 */
>  
>  	/* Cancel submitted Interrupt-URB's */
> -	if (psIntfAdapter->psInterruptUrb != NULL) {
> +	if (!psIntfAdapter->psInterruptUrb) {

This test is reversed.  Btw, if you run Smatch on your code it would
have caught this.

>  		if (psIntfAdapter->psInterruptUrb->status == -EINPROGRESS)
>  			usb_kill_urb(psIntfAdapter->psInterruptUrb);
>  	}

regards,
dan carpenter

_______________________________________________
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