diff options
author | Alexander Beregalov <a.beregalov@gmail.com> | 2011-03-26 17:18:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-20 20:45:59 (GMT) |
commit | 400838659314cc67032f35962eee5a8639981b61 (patch) | |
tree | 1b03ff869d305c5b7aca8ef2c9d5a6b1ff93c5bc /drivers/staging/rtl8712/rtl871x_io.c | |
parent | cc614b6970ed9957d51255682c2784c2310623af (diff) | |
download | linux-fsl-qoriq-400838659314cc67032f35962eee5a8639981b61.tar.xz |
Staging: rtl8712: redundant null check before kfree()
Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_io.c')
-rw-r--r-- | drivers/staging/rtl8712/rtl871x_io.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_io.c b/drivers/staging/rtl8712/rtl871x_io.c index e6e3c37..ca84ee0 100644 --- a/drivers/staging/rtl8712/rtl871x_io.c +++ b/drivers/staging/rtl8712/rtl871x_io.c @@ -73,8 +73,7 @@ static uint _init_intf_hdl(struct _adapter *padapter, goto _init_intf_hdl_fail; return _SUCCESS; _init_intf_hdl_fail: - if (pintf_priv) - kfree((u8 *)pintf_priv); + kfree(pintf_priv); return _FAIL; } @@ -84,8 +83,7 @@ static void _unload_intf_hdl(struct intf_priv *pintfpriv) unload_intf_priv = &r8712_usb_unload_intf_priv; unload_intf_priv(pintfpriv); - if (pintfpriv) - kfree((u8 *)pintfpriv); + kfree(pintfpriv); } static uint register_intf_hdl(u8 *dev, struct intf_hdl *pintfhdl) |