lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170125223627.GA27700@amd>
Date:   Wed, 25 Jan 2017 23:36:27 +0100
From:   Pavel Machek <pavel@....cz>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     Richard Purdie <rpurdie@...ys.net>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        linux-leds@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: ktd2692: avoid harmless maybe-uninitialized warning

On Wed 2017-01-25 23:22:36, Arnd Bergmann wrote:
> 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@...db.de>

Acked-by: Pavel Machek <pavel@....cz>

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ