Skip to content

Commit

Permalink
leds: pca963x: Add missing initialiation of struct led_info.flags
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Bryan Wu committed Mar 30, 2015
1 parent 9647507 commit a44b0f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/leds/leds-pca963x.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit a44b0f5

Please sign in to comment.