staging: r8712u: Fix regression caused by commit 8c213fa

Dan Carpenter dan.carpenter at oracle.com
Fri Mar 2 08:04:19 UTC 2012


Hello Larry Finger,

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

The patch 2080913e017a: "staging: r8712u: Fix regression caused by 
commit 8c213fa" from Feb 25, 2012, leads to the following Smatch 
complaint:

drivers/staging/rtl8712/usb_intf.c:629 r871xu_dev_remove()
	 warn: variable dereferenced before check 'padapter' (see line 625)

drivers/staging/rtl8712/usb_intf.c
   624		if (padapter->fw_found)
                    ^^^^^^^^^^^^^^^^^^
new

   625			release_firmware(padapter->fw);
                                         ^^^^^^^^^^^^
new
   626		/* never exit with a firmware callback pending */
   627		wait_for_completion(&padapter->rtl8712_fw_ready);
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^
new

   628		usb_set_intfdata(pusb_intf, NULL);
   629		if (padapter) {
                    ^^^^^^^^
Old check.

   630			if (drvpriv.drv_registered == true)
   631				padapter->bSurpriseRemoved = true;


regards,
dan carpenter




More information about the devel mailing list