Staging: rtl8723bs: Fix unbalanced braces in conditional
authorBryant Boatright <bryant.boatright@proton.me>
Fri, 4 Apr 2025 13:35:11 +0000 (13:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 14:28:11 +0000 (16:28 +0200)
Only one branch of conditional statement is a single statement thus both
branches should use braces to adhere to the Linux coding style.

Reported by checkpatch:

CHECK: Unbalanced braces around else statement

Signed-off-by: Bryant Boatright <bryant.boatright@proton.me>
Link: https://lore.kernel.org/r/Z-_gC8XOVoiXsC8i@ubuntu-desk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8723bs/core/rtw_cmd.c

index 1c9e8b01d9d862d560f6ce7909cd2965d761015d..946511793c08b41cf037664f1c0fb8550feae3d2 100644 (file)
@@ -273,9 +273,9 @@ struct      cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
 
        /* spin_lock_bh(&(queue->lock)); */
        spin_lock_irqsave(&queue->lock, irqL);
-       if (list_empty(&queue->queue))
+       if (list_empty(&queue->queue)) {
                obj = NULL;
-       else {
+       else {
                obj = container_of(get_next(&queue->queue), struct cmd_obj, list);
                list_del_init(&obj->list);
        }