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

Eric Anholt eric at anholt.net
Mon Mar 7 15:27:47 PST 2016


Vladimir Zapolskiy <vz at 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 at mleia.com>
> Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates")

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 818 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20160307/8e3b3375/attachment.sig>


More information about the linux-arm-kernel mailing list