rtl8188eu: Fix smatch warning in os_dep/osdep_service.c

Smatch shows the following warning:
  CHECK   /home/finger/rtl8188eu/os_dep/osdep_service.c
/home/finger/rtl8188eu/os_dep/osdep_service.c:670 rtw_change_ifname() warn: variable dereferenced before check 'padapter' (see line 666)

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-09-05 17:30:18 -05:00
parent be114f8fae
commit 43dd404762

View file

@ -663,12 +663,13 @@ RETURN:
int rtw_change_ifname(struct adapter *padapter, const char *ifname) int rtw_change_ifname(struct adapter *padapter, const char *ifname)
{ {
struct net_device *pnetdev; struct net_device *pnetdev;
struct net_device *cur_pnetdev = padapter->pnetdev; struct net_device *cur_pnetdev;
struct rereg_nd_name_data *rereg_priv; struct rereg_nd_name_data *rereg_priv;
int ret; int ret;
if (!padapter) if (!padapter)
goto error; goto error;
cur_pnetdev = padapter->pnetdev;
rereg_priv = &padapter->rereg_nd_name_priv; rereg_priv = &padapter->rereg_nd_name_priv;