Commit 0d5e4bfe authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: Fix smatch warnings in os_dep/*.c



Smatch shows the following:

drivers/staging/r8188eu/os_dep/ioctl_linux.c:1478 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1479 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1481 rtw_wx_set_essid() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:1555 rtw_wx_set_rate() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2596 rtw_wps_start() warn: variable dereferenced before check 'pdata' (see line 2590)
drivers/staging/r8188eu/os_dep/ioctl_linux.c:2790 rtw_p2p_profilefound() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:4846 rtw_set_encryption() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:5628 rtw_mp_efuse_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7251 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7255 rtw_mp_set() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7310 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7345 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/ioctl_linux.c:7349 rtw_mp_get() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/mlme_linux.c:106 rtw_os_indicate_disconnect() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/os_intfs.c:1118 ips_netdrv_open() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/osdep_service.c:37 rtw_atoi() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/recv_linux.c:65 rtw_os_recvbuf_resource_free() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/usb_intf.c:338 rtw_hw_suspend() warn: variable dereferenced before check 'padapter' (see line 327)
drivers/staging/r8188eu/os_dep/usb_intf.c:381 rtw_hw_suspend() warn: inconsistent indenting
drivers/staging/r8188eu/os_dep/usb_intf.c:394 rtw_hw_resume() warn: variable dereferenced before check 'padapter' (see line 391)
drivers/staging/r8188eu/os_dep/usb_intf.c:506 rtw_resume() warn: inconsistent indenting

Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Link: https://lore.kernel.org/r/20210812015232.23784-4-Larry.Finger@lwfinger.net


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 178cd80d
Loading
Loading
Loading
Loading
+14 −12
Original line number Diff line number Diff line
@@ -2587,13 +2587,15 @@ static int rtw_wps_start(struct net_device *dev,
	struct iw_point *pdata = &wrqu->data;
	u32   u32wps_start = 0;

	if (!pdata)
		return -EINVAL;
	ret = copy_from_user((void *)&u32wps_start, pdata->pointer, 4);
	if (ret) {
		ret = -EINVAL;
		goto exit;
	}

	if (padapter->bDriverStopped || !pdata) {
	if (padapter->bDriverStopped) {
		ret = -EINVAL;
		goto exit;
	}
+1 −2
Original line number Diff line number Diff line
@@ -104,7 +104,6 @@ void rtw_os_indicate_disconnect(struct adapter *adapter)
	netif_carrier_off(adapter->pnetdev); /*  Do it first for tx broadcast pkt after disconnection issue! */
	rtw_indicate_wx_disassoc_event(adapter);
	rtw_reset_securitypriv(adapter);

}

void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
+56 −61
Original line number Diff line number Diff line
@@ -326,6 +326,8 @@ int rtw_hw_suspend(struct adapter *padapter)
	struct net_device *pnetdev = padapter->pnetdev;


	if (!padapter)
		goto error_exit;
	if ((!padapter->bup) || (padapter->bDriverStopped) ||
	    (padapter->bSurpriseRemoved)) {
		DBG_88E("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n",
@@ -334,7 +336,6 @@ int rtw_hw_suspend(struct adapter *padapter)
		goto error_exit;
	}

	if (padapter) { /* system suspend */
	LeaveAllPowerSaveMode(padapter);

	DBG_88E("==> rtw_hw_suspend\n");
@@ -374,9 +375,6 @@ int rtw_hw_suspend(struct adapter *padapter)
	pwrpriv->bips_processing = false;

	_exit_pwrlock(&pwrpriv->lock);
	} else {
		goto error_exit;
	}
	return 0;

error_exit:
@@ -386,11 +384,12 @@ int rtw_hw_suspend(struct adapter *padapter)

int rtw_hw_resume(struct adapter *padapter)
{
	struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
	struct pwrctrl_priv *pwrpriv;
	struct net_device *pnetdev = padapter->pnetdev;


	if (padapter) { /* system resume */
	if (!padapter)
		goto error_exit;
	pwrpriv = &padapter->pwrctrlpriv;
	DBG_88E("==> rtw_hw_resume\n");
	_enter_pwrlock(&pwrpriv->lock);
	pwrpriv->bips_processing = true;
@@ -416,10 +415,6 @@ int rtw_hw_resume(struct adapter *padapter)
	pwrpriv->bips_processing = false;

	_exit_pwrlock(&pwrpriv->lock);
	} else {
		goto error_exit;
	}


	return 0;
error_exit:
+1 −1

File changed.

Contains only whitespace changes.

+1 −1

File changed.

Contains only whitespace changes.

+4 −4

File changed.

Contains only whitespace changes.

Loading