[openwrt/openwrt] realtek: Keep return statements on new line

LEDE Commits lede-commits at lists.infradead.org
Mon Nov 24 15:30:10 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20fd6c9d10d9801006a7fbb82b2c67bca5aedc9f

commit 20fd6c9d10d9801006a7fbb82b2c67bca5aedc9f
Author: Sven Eckelmann <sven at narfation.org>
AuthorDate: Sun Nov 23 17:01:34 2025 +0100

    realtek: Keep return statements on new line
    
    It is not allowed in the Linux kernel to have the condition and
    the actual statement(s) on the same line. This is required to
    make it easier to identify the body of an if/do/while/for/..
    
    Signed-off-by: Sven Eckelmann <sven at narfation.org>
    Link: https://github.com/openwrt/openwrt/pull/20906
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
index fed73dcc4f..9b81c4ddc3 100644
--- a/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
+++ b/target/linux/realtek/files-6.12/drivers/net/dsa/rtl83xx/dsa.c
@@ -2141,7 +2141,8 @@ static int rtl83xx_vlan_add(struct dsa_switch *ds, int port,
 		__func__, port, vlan->vid, vlan->flags);
 
 	/* Let no one mess with our special VLAN 0 */
-	if (!vlan->vid) return 0;
+	if (!vlan->vid)
+		return 0;
 
 	if (vlan->vid > 4095) {
 		dev_err(priv->dev, "VLAN out of range: %d", vlan->vid);
@@ -2212,7 +2213,8 @@ static int rtl83xx_vlan_del(struct dsa_switch *ds, int port,
 		__func__, port, vlan->vid, vlan->flags);
 
 	/* Let no one mess with our special VLAN 0 */
-	if (!vlan->vid) return 0;
+	if (!vlan->vid)
+		return 0;
 
 	if (vlan->vid > 4095) {
 		dev_err(priv->dev, "VLAN out of range: %d", vlan->vid);




More information about the lede-commits mailing list