aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2020-12-08 21:54:40 +0100
committerPetr Štetiar <ynezz@true.cz>2020-12-11 13:48:24 +0100
commit848d668427c544d20f8aa3041fa11b4d4adc9bc8 (patch)
tree6cda0625549349ea7a58ba39d6b5b3371eff56ba
parentd82c1912838f262b6f4b9157077f390f5f06b6c4 (diff)
downloadupstream-848d668427c544d20f8aa3041fa11b4d4adc9bc8.tar.gz
upstream-848d668427c544d20f8aa3041fa11b4d4adc9bc8.tar.bz2
upstream-848d668427c544d20f8aa3041fa11b4d4adc9bc8.zip
realtek: Fix self assignment
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>
-rw-r--r--target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c b/target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c
index 92cf5f765a..8207e4bb73 100644
--- a/target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c
+++ b/target/linux/realtek/files-5.4/drivers/gpio/gpio-rtl838x.c
@@ -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;