From: Larry Finger Date: Wed, 4 Sep 2013 20:55:55 +0000 (-0500) Subject: staging: r8188eu: Fix smatch warning in os_dep/usb_intf.c X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=dc2f9db95507b8641303c70e8e62ce286815ccdf;p=linux-beck.git staging: r8188eu: Fix smatch warning in os_dep/usb_intf.c Smatch reports the following warning: CHECK drivers/staging/rtl8188eu/os_dep/usb_intf.c drivers/staging/rtl8188eu/os_dep/usb_intf.c:740 rtw_usb_if1_init() info: redundant null check on padapter->HalData calling kfree() Signed-off-by: Larry Finger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/os_dep/usb_intf.c b/drivers/staging/rtl8188eu/os_dep/usb_intf.c index d3078d200e50..6e40299adbc2 100644 --- a/drivers/staging/rtl8188eu/os_dep/usb_intf.c +++ b/drivers/staging/rtl8188eu/os_dep/usb_intf.c @@ -736,7 +736,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, status = _SUCCESS; free_hal_data: - if (status != _SUCCESS && padapter->HalData) + if (status != _SUCCESS) kfree(padapter->HalData); handle_dualmac: if (status != _SUCCESS)