]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
staging: rtl8723bs: make _rtw_enqueue_cmd return 0 on success
authorHungyu Lin <dennylin0707@gmail.com>
Wed, 13 May 2026 21:37:19 +0000 (21:37 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 21 May 2026 10:39:28 +0000 (12:39 +0200)
Convert the private helper _rtw_enqueue_cmd() to return 0 on
success instead of the legacy _SUCCESS value.

Keep rtw_enqueue_cmd() translating the result back to the
existing return convention for now.

No functional change intended.

Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
Link: https://patch.msgid.link/20260513213719.12246-5-dennylin0707@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c

index 169e20bbd90bca28146cd34a146aef86fe2a4512..b932670f5d63acb499a018a2536cdbfb5ea13bfc 100644 (file)
@@ -253,7 +253,7 @@ static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
        unsigned long irqL;
 
        if (!obj)
-               return _SUCCESS;
+               return 0;
 
        /* spin_lock_bh(&queue->lock); */
        spin_lock_irqsave(&queue->lock, irqL);
@@ -263,7 +263,7 @@ static int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
        /* spin_unlock_bh(&queue->lock); */
        spin_unlock_irqrestore(&queue->lock, irqL);
 
-       return _SUCCESS;
+       return 0;
 }
 
 struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
@@ -329,10 +329,12 @@ int rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
 
        res = _rtw_enqueue_cmd(&pcmdpriv->cmd_queue, cmd_obj);
 
-       if (res == _SUCCESS)
+       if (res == 0) {
                complete(&pcmdpriv->cmd_queue_comp);
+               return _SUCCESS;
+       }
 
-       return res;
+       return _FAIL;
 }
 
 struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv)