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: <570F7B26.2090202@samsung.com>
Date:	Thu, 14 Apr 2016 13:12:38 +0200
From:	Jacek Anaszewski <j.anaszewski@...sung.com>
To:	Dan Carpenter <dan.carpenter@...cle.com>
Cc:	Richard Purdie <rpurdie@...ys.net>, linux-leds@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: Re: [patch] leds: tca6507: silence an uninitialized variable warning

Hi Dan,

Thanks for the patch.

Applied to the for-next branch of linux-leds.git.

Thanks,
Jacek Anaszewski

On 04/14/2016 11:36 AM, Dan Carpenter wrote:
> If choose_times() returns -EINVAL that means "c1" and "c2" haven't been
> initialized.  I've added a check for that.
>
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/drivers/leds/leds-tca6507.c b/drivers/leds/leds-tca6507.c
> index c548ea1..45222a7 100644
> --- a/drivers/leds/leds-tca6507.c
> +++ b/drivers/leds/leds-tca6507.c
> @@ -327,6 +327,8 @@ static void set_times(struct tca6507_chip *tca, int bank)
>   	int result;
>
>   	result = choose_times(tca->bank[bank].ontime, &c1, &c2);
> +	if (result < 0)
> +		return;
>   	dev_dbg(&tca->client->dev,
>   		"Chose on  times %d(%d) %d(%d) for %dms\n",
>   		c1, time_codes[c1],
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ