Re: [PATCH] clk: bcm2835: fix check of error code returned by devm_ioremap_resource()

Eric Anholt
2016-03-07T23:27:47Z

[-- Attachment #1: Type: text/plain, Size: 498 bytes --]

Vladimir Zapolskiy <vz@mleia.com> writes:

> The change fixes potential oops while accessing iomem on invalid
> address, if devm_ioremap_resource() fails due to some reason.
>
> The devm_ioremap_resource() function returns ERR_PTR() and never
> returns NULL, which makes useless a following check for NULL.
>
> Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
> Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates")

Reviewed-by: Eric Anholt <eric@anholt.net>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]