Arnd Bergmann cbe99c538d leds: ktd2692: avoid harmless maybe-uninitialized warning
gcc gets confused about the control flow in ktd2692_parse_dt(), causing
it to warn about what seems like a potential bug:

drivers/leds/leds-ktd2692.c: In function 'ktd2692_probe':
drivers/leds/leds-ktd2692.c:244:15: error: '*((void *)&led_cfg+8)' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/leds/leds-ktd2692.c:225:7: error: 'led_cfg.flash_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]
drivers/leds/leds-ktd2692.c:232:3: error: 'led_cfg.movie_max_microamp' may be used uninitialized in this function [-Werror=maybe-uninitialized]

The code is fine, and slightly reworking it in an equivalent way lets
gcc figure that out too, which gets rid of the warning.

Fixes: 77e7915b15bb ("leds: ktd2692: Add missing of_node_put")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
2017-01-26 21:16:38 +01:00
..
2016-12-25 10:47:44 +01:00
2016-01-04 09:57:32 +01:00
2016-01-04 09:57:32 +01:00
2016-01-04 09:57:34 +01:00
2016-01-04 09:57:36 +01:00
2016-01-04 09:57:32 +01:00
2016-01-04 09:57:33 +01:00
2016-01-04 09:57:33 +01:00
2016-01-04 09:57:33 +01:00
2016-01-04 09:57:33 +01:00
2016-01-04 09:57:33 +01:00
2016-01-04 09:57:34 +01:00
2016-01-04 09:57:37 +01:00
2016-12-02 09:31:50 +01:00
2016-11-30 11:10:09 +01:00
2016-08-16 22:37:26 +02:00
2016-01-04 09:57:35 +01:00