diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2015-03-15 06:41:52 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@gmail.com> | 2015-03-30 14:55:48 -0400 |
commit | a44b0f5edfc63dc06af9bb0ae473f7852d8d2cb6 (patch) | |
tree | a42228eae3fb2c362982eab3a024314ccfe40458 | |
parent | 9647507aff4d885d98a884a634d360b8f2d24c10 (diff) |
leds: pca963x: Add missing initialiation of struct led_info.flags
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>
-rw-r--r-- | drivers/leds/leds-pca963x.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/leds/leds-pca963x.c b/drivers/leds/leds-pca963x.c index f110b4c456ba..bee3e1ab27fd 100644 --- a/drivers/leds/leds-pca963x.c +++ b/drivers/leds/leds-pca963x.c | |||
@@ -289,7 +289,7 @@ pca963x_dt_init(struct i2c_client *client, struct pca963x_chipdef *chip) | |||
289 | return ERR_PTR(-ENOMEM); | 289 | return ERR_PTR(-ENOMEM); |
290 | 290 | ||
291 | for_each_child_of_node(np, child) { | 291 | for_each_child_of_node(np, child) { |
292 | struct led_info led; | 292 | struct led_info led = {}; |
293 | u32 reg; | 293 | u32 reg; |
294 | int res; | 294 | int res; |
295 | 295 | ||