staging: rtl8723bs: remove assignment in condition in os_dep/ioctl_linux.c
fix the following checkpatch warning: ERROR: do not use assignment in if condition 2607: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2607: + if (0 != (ret = rtw_change_ifname(padapter, new_ifname))) -- ERROR: do not use assignment in if condition 4239: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4239: + if (!(ext = vmalloc(len))) -- ERROR: do not use assignment in if condition 4253: FILE: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:4253: + if (!(ext_dbg = vmalloc(len))) { Signed-off-by: Fabio Aiuto <fabioaiuto83@gmail.com> Link: https://lore.kernel.org/r/98b58790ae7c791d091b301bccf67a70c41ec599.1616600897.git.fabioaiuto83@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c8ad167ebe
commit
61d6809f9c
@ -2604,7 +2604,8 @@ static int rtw_rereg_nd_name(struct net_device *dev,
|
||||
return ret;
|
||||
|
||||
DBG_871X("%s new_ifname:%s\n", __func__, new_ifname);
|
||||
if (0 != (ret = rtw_change_ifname(padapter, new_ifname)))
|
||||
ret = rtw_change_ifname(padapter, new_ifname);
|
||||
if (ret != 0)
|
||||
goto exit;
|
||||
|
||||
strncpy(rereg_priv->old_ifname, new_ifname, IFNAMSIZ);
|
||||
@ -4236,7 +4237,8 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||
return -EFAULT;
|
||||
|
||||
len = dwrq->length;
|
||||
if (!(ext = vmalloc(len)))
|
||||
ext = vmalloc(len);
|
||||
if (!ext)
|
||||
return -ENOMEM;
|
||||
|
||||
if (copy_from_user(ext, dwrq->pointer, len)) {
|
||||
@ -4250,7 +4252,8 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
||||
/* dev->name, ext)); */
|
||||
|
||||
#ifdef DEBUG_RTW_WX_SET_PRIV
|
||||
if (!(ext_dbg = vmalloc(len))) {
|
||||
ext_dbg = vmalloc(len);
|
||||
if (!ext_dbg) {
|
||||
vfree(ext, len);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user