staging: rtl8723bs: Relocate constant on the right side of test
authorKang Minchul <tegongkang@gmail.com>
Thu, 22 Sep 2022 12:23:08 +0000 (21:23 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Sep 2022 11:02:39 +0000 (13:02 +0200)
This patch fixes following warning generated by checkpatch:

  WARNING: Comparisons should place the constant on the right side of the test

Signed-off-by: Kang Minchul <tegongkang@gmail.com>
Link: https://lore.kernel.org/r/20220922122310.3379711-3-tegongkang@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/os_dep/ioctl_cfg80211.c

index 63d417f881a68a3203868aca1312457a343b8351..466d05e9ed6ce6cd25d7231531b0de51d9d1c53c 100644 (file)
@@ -1065,7 +1065,7 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
                }
        }
 
-       if (_FAIL == rtw_pwr_wakeup(padapter)) {
+       if (rtw_pwr_wakeup(padapter) == _FAIL) {
                ret = -EPERM;
                goto exit;
        }
@@ -1239,7 +1239,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
        }
 
        rtw_ps_deny(padapter, PS_DENY_SCAN);
-       if (_FAIL == rtw_pwr_wakeup(padapter)) {
+       if (rtw_pwr_wakeup(padapter) == _FAIL) {
                need_indicate_scan_done = true;
                goto check_need_indicate_scan_done;
        }
@@ -1582,7 +1582,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        int ret = 0;
 
-       if (_FAIL == rtw_pwr_wakeup(padapter)) {
+       if (rtw_pwr_wakeup(padapter) == _FAIL) {
                ret = -EPERM;
                goto exit;
        }
@@ -1673,7 +1673,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
        }
 
        rtw_ps_deny(padapter, PS_DENY_JOIN);
-       if (_FAIL == rtw_pwr_wakeup(padapter)) {
+       if (rtw_pwr_wakeup(padapter) == _FAIL) {
                ret = -EPERM;
                goto exit;
        }
@@ -2467,7 +2467,7 @@ static int        cfg80211_rtw_dump_station(struct wiphy *wiphy, struct net_device *nde
        spin_lock_bh(&pstapriv->asoc_list_lock);
        psta = rtw_sta_info_get_by_idx(idx, pstapriv);
        spin_unlock_bh(&pstapriv->asoc_list_lock);
-       if (NULL == psta) {
+       if (psta == NULL) {
                ret = -ENOENT;
                goto exit;
        }
@@ -2602,7 +2602,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy,
                goto exit;
 
        rtw_ps_deny(padapter, PS_DENY_MGNT_TX);
-       if (_FAIL == rtw_pwr_wakeup(padapter)) {
+       if (rtw_pwr_wakeup(padapter) == _FAIL) {
                ret = -EFAULT;
                goto cancel_ps_deny;
        }