summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8723bs
diff options
context:
space:
mode:
authorJason Yan <yanaijie@huawei.com>2020-04-27 06:23:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-28 15:29:41 +0300
commitfc84701810fa02b6281b0afed201b4fd7b4c792c (patch)
tree5f314be5b500e3efc93fe292023ec42cd1213862 /drivers/staging/rtl8723bs
parent10b674be0a0c8a2a819c69786b07e76ab141e7c0 (diff)
downloadlinux-fc84701810fa02b6281b0afed201b4fd7b4c792c.tar.xz
staging: rtl8723bs: os_dep: remove set but not used 'uintRet'
Fix the following gcc warning: drivers/staging/rtl8723bs/os_dep/ioctl_linux.c:2564:22: warning: variable ‘uintRet’ set but not used [-Wunused-but-set-variable] unsigned int uintRet = 0; ^~~~~~~ Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Jason Yan <yanaijie@huawei.com> Link: https://lore.kernel.org/r/20200427032342.27211-2-yanaijie@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8723bs')
-rw-r--r--drivers/staging/rtl8723bs/os_dep/ioctl_linux.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
index 5059b874080e..902ac8169948 100644
--- a/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
+++ b/drivers/staging/rtl8723bs/os_dep/ioctl_linux.c
@@ -2561,14 +2561,16 @@ static int rtw_wps_start(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct iw_point *pdata = &wrqu->data;
u32 u32wps_start = 0;
- unsigned int uintRet = 0;
if ((true == padapter->bDriverStopped) || (true == padapter->bSurpriseRemoved) || (NULL == pdata)) {
ret = -EINVAL;
goto exit;
}
- uintRet = copy_from_user((void *)&u32wps_start, pdata->pointer, 4);
+ if (copy_from_user((void *)&u32wps_start, pdata->pointer, 4)) {
+ ret = -EFAULT;
+ goto exit;
+ }
if (u32wps_start == 0)
u32wps_start = *extra;