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, 30 Jan 2009 12:10:09 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
Cc:	sameo@...nedhand.com, linux-kernel@...r.kernel.org,
	broonie@...nsource.wolfsonmicro.com
Subject: Re: [PATCH 3/3] mfd: Improve diagnostics for WM8350 ID register
 probe

On Fri, 23 Jan 2009 16:18:36 +0000
Mark Brown <broonie@...nsource.wolfsonmicro.com> wrote:

> @@ -1297,14 +1297,29 @@ static void wm8350_client_dev_register(struct wm8350 *wm8350,
>  int wm8350_device_init(struct wm8350 *wm8350, int irq,
>  		       struct wm8350_platform_data *pdata)
>  {
> -	int ret = -EINVAL;
> +	int ret;
>  	u16 id1, id2, mask_rev;
>  	u16 cust_id, mode, chip_rev;
>  
>  	/* get WM8350 revision and config mode */
> -	wm8350->read_dev(wm8350, WM8350_RESET_ID, sizeof(id1), &id1);
> -	wm8350->read_dev(wm8350, WM8350_ID, sizeof(id2), &id2);
> -	wm8350->read_dev(wm8350, WM8350_REVISION, sizeof(mask_rev), &mask_rev);
> +	ret = wm8350->read_dev(wm8350, WM8350_RESET_ID, sizeof(id1), &id1);
> +	if (ret != 0) {
> +		dev_err(wm8350->dev, "Failed to read ID: %d\n", ret);
> +		goto err;
> +	}
> +
> +	ret = wm8350->read_dev(wm8350, WM8350_ID, sizeof(id2), &id2);

Reading a bunch of bytes into a u16 looks a bit fishy from the endianness
point of view?
--
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