Hello Dan, Thus wrote Dan Carpenter (dan.carpenter@xxxxxxxxxx): > Hello Larry and Martin, > The patch 0d5e4bfe47ea: "staging: r8188eu: Fix smatch warnings in > os_dep/*.c" from Aug 11, 2021, leads to the following > Smatch static checker warning: > drivers/staging/r8188eu/os_dep/usb_intf.c:286 rtw_hw_resume() > warn: variable dereferenced before check 'padapter' (see line 284) > drivers/staging/r8188eu/os_dep/usb_intf.c > 281 int rtw_hw_resume(struct adapter *padapter) > 282 { > 283 struct pwrctrl_priv *pwrpriv; > 284 struct net_device *pnetdev = padapter->pnetdev; > ^^^^^^^^^^^^^^^^^ > Dereferenced > 285 > --> 286 if (!padapter) > ^^^^^^^^^ > Checked too late. > This warning was silenced when Smatch could tell that "padapter" was > non-NULL but Martin removed the last caller in commit c0a099b7341c > ("staging: r8188eu: bHWPwrPindetect is always false"). > So the correct fix is to just delete this function? yes, rtw_hw_resume is no longer used. I submitted a patch to remove the function. I'll have to rebase and resend it. Best regards, Martin