Skip to contentSkip to conversation

Staging: rtl8723bs: Fix unbalanced braces in conditional

PATCH New Bryant Boatright 1 participant 1 message Apr 4, 2025 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: rtl8723bs: Fix unbalanced braces in conditional

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

---
 drivers/staging/rtl8723bs/core/rtw_cmd.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8723bs/core/rtw_cmd.c +2 -2
index 64ce33c6fba1..5fd635a4c632 100644
@@ -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);
 	}
Signature · 1 line
2.43.0