diff options
| author | 2021-09-05 23:42:18 +0300 | |
|---|---|---|
| committer | 2021-09-13 08:49:49 +0200 | |
| commit | 07f32223c098cccfd549f996db76a5c578902e93 (patch) | |
| tree | 37e669e76ed863db3abd2c6fde1c500fee53127e | |
| parent | staging: r8188eu: include: remove duplicate declaration. (diff) | |
staging: r8188eu: remove useless check
smatch says:
usb_intf.c:326 rtw_hw_suspend() warn: variable dereferenced before check 'padapter' (see line 323)
usb_intf.c:387 rtw_hw_resume() warn: variable dereferenced before check 'padapter' (see line 385)
There is only one caller of rtw_hw_suspend() and it does not check
padapter pointer, so let's just omit this check to make smatch happy.
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/20210905204218.19317-1-paskripkin@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/r8188eu/os_dep/usb_intf.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/staging/r8188eu/os_dep/usb_intf.c b/drivers/staging/r8188eu/os_dep/usb_intf.c index b7129e8b9924..56a4138a064f 100644 --- a/drivers/staging/r8188eu/os_dep/usb_intf.c +++ b/drivers/staging/r8188eu/os_dep/usb_intf.c @@ -323,9 +323,6 @@ int rtw_hw_suspend(struct adapter *padapter) struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv; struct net_device *pnetdev = padapter->pnetdev; - - if (!padapter) - goto error_exit; if ((!padapter->bup) || (padapter->bDriverStopped) || (padapter->bSurpriseRemoved)) { DBG_88E("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n", |
