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]
Date:	Fri, 25 Jan 2013 14:35:59 +0000
From:	Amit Kucheria <amit.kucheria@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	linux-arm-kernel@...t.infradead.org, linux-kernel@...r.kernel.org,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Peter Ujfalusi <peter.ujfalusi@...com>,
	Kevin Hilman <khilman@...com>
Subject: Re: [PATCH 09/19] mfd/twl4030: don't warn about uninitialized return code

On Fri, Jan 25, 2013 at 2:14 PM, Arnd Bergmann <arnd@...db.de> wrote:
> If the twl4030_write_script function gets called with
> a zero length argument, its return value does not
> get set. We know that all scripts have a nonzero
> length, but returning an error in case they ever
> do is probably appropriate.
>
> Without this patch, building omap2plus_defconfig results in:
>
> drivers/mfd/twl4030-power.c: In function 'load_twl4030_script':
> drivers/mfd/twl4030-power.c:414:5: error: 'err' may be used uninitialized in this function

Reviewed-by: Amit Kucheria <amit.kucheria@...aro.org>

> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Cc: Samuel Ortiz <sameo@...ux.intel.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@...com>
> Cc: Kevin Hilman <khilman@...com>
> Cc: Amit Kucheria <amit.kucheria@...aro.org>
> ---
>  drivers/mfd/twl4030-power.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
> index 4dae241..dd362c1 100644
> --- a/drivers/mfd/twl4030-power.c
> +++ b/drivers/mfd/twl4030-power.c
> @@ -159,7 +159,7 @@ out:
>  static int twl4030_write_script(u8 address, struct twl4030_ins *script,
>                                        int len)
>  {
> -       int err;
> +       int err = -EINVAL;
>
>         for (; len; len--, address++, script++) {
>                 if (len == 1) {
> --
> 1.8.0
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ