leds: pca963x: Add missing initialiation of struct led_info.flags
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 15 Mar 2015 10:41:52 +0000 (03:41 -0700)
committerBryan Wu <cooloney@gmail.com>
Mon, 30 Mar 2015 18:55:48 +0000 (11:55 -0700)
Only the name and default_trigger fields are initialized.
Other fields (currently flags only) contain random stack data.
Pre-initialize the led structure completely to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-pca963x.c

index f110b4c456baa77f632c610fd8e024c94eb5b3fe..bee3e1ab27fd92fd7b71ab0a34812cd80ac5c8d0 100644 (file)
@@ -289,7 +289,7 @@ pca963x_dt_init(struct i2c_client *client, struct pca963x_chipdef *chip)
                return ERR_PTR(-ENOMEM);
 
        for_each_child_of_node(np, child) {
-               struct led_info led;
+               struct led_info led = {};
                u32 reg;
                int res;