From 43dd404762abe20ed777f80f62c417e8e82b6a7f Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Thu, 5 Sep 2013 17:30:18 -0500 Subject: [PATCH] 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 --- os_dep/osdep_service.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 3bac94e..4e402ea 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -663,12 +663,13 @@ RETURN: int rtw_change_ifname(struct adapter *padapter, const char *ifname) { struct net_device *pnetdev; - struct net_device *cur_pnetdev = padapter->pnetdev; + struct net_device *cur_pnetdev; struct rereg_nd_name_data *rereg_priv; int ret; if (!padapter) goto error; + cur_pnetdev = padapter->pnetdev; rereg_priv = &padapter->rereg_nd_name_priv;