Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / drivers / staging / rtl8188eu / core / rtw_cmd.c
index 89b5e48..45d0a87 100644 (file)
@@ -125,7 +125,7 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
        cmd_obj->padapter = padapter;
 
        res = rtw_cmd_filter(pcmdpriv, cmd_obj);
-       if (_FAIL == res) {
+       if (res == _FAIL) {
                rtw_free_cmd_obj(cmd_obj);
                goto exit;
        }
@@ -199,7 +199,7 @@ _next:
                if (!pcmd)
                        continue;
 
-               if (_FAIL == rtw_cmd_filter(pcmdpriv, pcmd)) {
+               if (rtw_cmd_filter(pcmdpriv, pcmd) == _FAIL) {
                        pcmd->res = H2C_DROPPED;
                        goto post_process;
                }
@@ -553,7 +553,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
                res = rtw_enqueue_cmd(cmdpriv, cmdobj);
        } else {
                /* no need to enqueue, do the cmd hdl directly and free cmd parameter */
-               if (H2C_SUCCESS != disconnect_hdl(padapter, (u8 *)param))
+               if (disconnect_hdl(padapter, (u8 *)param) != H2C_SUCCESS)
                        res = _FAIL;
                kfree(param);
        }
@@ -718,13 +718,13 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
        u8      res = _SUCCESS;
 
 
-       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       paddbareq_parm = kzalloc(sizeof(struct addBaReq_parm), GFP_KERNEL);
+       paddbareq_parm = kzalloc(sizeof(struct addBaReq_parm), GFP_ATOMIC);
        if (paddbareq_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -819,7 +819,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue)
                res = rtw_enqueue_cmd(pcmdpriv, pcmdobj);
        } else {
                /* no need to enqueue, do the cmd hdl directly and free cmd parameter */
-               if (H2C_SUCCESS != set_chplan_hdl(padapter, (unsigned char *)setChannelPlan_param))
+               if (set_chplan_hdl(padapter, (unsigned char *)setChannelPlan_param) != H2C_SUCCESS)
                        res = _FAIL;
 
                kfree(setChannelPlan_param);