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: <20081117152506.GA29949@gambetta>
Date:	Mon, 17 Nov 2008 16:25:06 +0100
From:	Frederik Deweerdt <frederik.deweerdt@...og.eu>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	Richard Purdie <rpurdie@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: Add WM8350 LED driver

Hello Mark,

On Mon, Nov 17, 2008 at 02:52:09PM +0000, Mark Brown wrote:
[...]
> +/* Microamps */
> +static const int isink_cur[] = {
[...]
> +	223191
> +};
> +
[...]
> +	for (i = 0; i < ARRAY_SIZE(isink_cur); i++)
> +		if (isink_cur[i] >= pdata->max_uA)
> +			break;
> +	led->max_uA_index = i;
> +	if (pdata->max_uA != isink_cur[i])
                                      ^^^
I may be missing something but isn't the code doing an off-by-one here
if pdata->max_uA > 223191 ?

Regards,
Frederik
--
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