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] [day] [month] [year] [list]
Message-ID: <CAK8P3a0K6aX_GR+yh4MhkWkBDiHiaq5NC+TrKfqcWFXoptNHmg@mail.gmail.com>
Date:   Thu, 27 Sep 2018 11:06:06 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc:     Mauro Carvalho Chehab <mchehab@...nel.org>,
        Akinobu Mita <akinobu.mita@...il.com>,
        Sylwester Nawrocki <s.nawrocki@...sung.com>,
        Hans Verkuil <hans.verkuil@...co.com>,
        Wolfram Sang <wsa+renesas@...g-engineering.com>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Linux Media Mailing List <linux-media@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] media: ov9650: avoid maybe-uninitialized warnings

On Wed, Sep 26, 2018 at 11:17 PM Sakari Ailus
<sakari.ailus@...ux.intel.com> wrote:
>
> Hi Arnd,
>
> On Wed, Sep 26, 2018 at 02:51:01PM +0200, Arnd Bergmann wrote:
> > The regmap change causes multiple warnings like
> >
> > drivers/media/i2c/ov9650.c: In function 'ov965x_g_volatile_ctrl':
> > drivers/media/i2c/ov9650.c:889:29: error: 'reg2' may be used uninitialized in this function [-Werror=maybe-uninitialized]
> >    exposure = ((reg2 & 0x3f) << 10) | (reg1 << 2) |
> >               ~~~~~~~~~~~~~~~^~~~~~
> >
> > It is apparently hard for the compiler to see here if ov965x_read()
> > returned successfully or not. Besides, we have a v4l2_dbg() statement
> > that prints an uninitialized value if regmap_read() fails.
> >
> > Adding an 'else' clause avoids the ambiguity.
>
> Thanks!
>
> I'm not sure what happened here but the two lines use spaces for
> indentation. I've replaced those with tabs.

Thanks a lot, that was clearly what I had intended to send.

        Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ