realtek: Fix self assignment
authorRafał Mikrut <mikrutrafal@protonmail.com>
Tue, 8 Dec 2020 20:54:40 +0000 (21:54 +0100)
committerPetr Štetiar <ynezz@true.cz>
Fri, 11 Dec 2020 12:48:24 +0000 (13:48 +0100)
Cppcheck shows self initialization error, which is an obvious bug.

Basing on logic of similar fragment below I assigned to this variable,
value `RTL838X_LED_GLB_CTRL` which I think is proper.

Signed-off-by: Rafał Mikrut <mikrutrafal@protonmail.com>
target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c

index 92cf5f765a9b32b889a83f8397b8768b084a8b2e..8207e4bb73f0bfdf57aa1779b10af308a944b33d 100644 (file)
@@ -357,7 +357,7 @@ static int rtl838x_gpio_probe(struct platform_device *pdev)
        }
 
        if (soc_info.family == RTL8380_FAMILY_ID) {
-               gpios->led_glb_ctrl = gpios->led_glb_ctrl;
+               gpios->led_glb_ctrl = RTL838X_LED_GLB_CTRL;
                gpios->led_sw_ctrl = RTL838X_LED_SW_CTRL;
                gpios->led_sw_p_ctrl = rtl838x_led_sw_p_ctrl;
                gpios->led_sw_p_en_ctrl = rtl838x_led_sw_p_en_ctrl;