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: <CABymUCOj=yHAbdK5=uMtNiHjgSPKx7z-=Vc1JRy_nkE9rB1jAw@mail.gmail.com>
Date:	Sat, 11 Jul 2015 10:02:28 +0800
From:	Jun Nie <jun.nie@...aro.org>
To:	Krzysztof Kozlowski <k.kozlowski.k@...il.com>
Cc:	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>,
	Jaroslav Kysela <perex@...ex.cz>, Takashi Iwai <tiwai@...e.de>,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
	stable@...r.kernel.org
Subject: Re: [RFT PATCH 1/2] ASoC: zx: i2s: Fix devm_ioremap_resource return
 value check

2015-07-09 21:19 GMT+08:00 Krzysztof Kozlowski <k.kozlowski.k@...il.com>:
> Value returned by devm_ioremap_resource() was checked for non-NULL but
> devm_ioremap_resource() returns IOMEM_ERR_PTR, not NULL. In case of
> error this could lead to dereference of ERR_PTR.
>
> Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@...il.com>
> Cc: <stable@...r.kernel.org>
> Fixes: e5d4cd87800c ("ASoC: zx: Add ZTE zx296702 I2S DAI driver")
>
> ---
>
> Patch only compile tested.
> ---
>  sound/soc/zte/zx296702-i2s.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/zte/zx296702-i2s.c b/sound/soc/zte/zx296702-i2s.c
> index 98d96e1b17e0..1930c42e1f55 100644
> --- a/sound/soc/zte/zx296702-i2s.c
> +++ b/sound/soc/zte/zx296702-i2s.c
> @@ -393,9 +393,9 @@ static int zx_i2s_probe(struct platform_device *pdev)
>         res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>         zx_i2s->mapbase = res->start;
>         zx_i2s->reg_base = devm_ioremap_resource(&pdev->dev, res);
> -       if (!zx_i2s->reg_base) {
> +       if (IS_ERR(zx_i2s->reg_base)) {
>                 dev_err(&pdev->dev, "ioremap failed!\n");
> -               return -EIO;
> +               return PTR_ERR(zx_i2s->reg_base);
>         }
>
>         writel_relaxed(0, zx_i2s->reg_base + ZX_I2S_FIFO_CTRL);
> --
> 2.1.4
>
Reviewed-by: Jun Nie <jun.nie@...aro.org>
--
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