crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()

commit b62917a262 upstream.

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: 5a4eea2658 ("crypto: ux500 - Use devm_xxx() managed function")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Vladimir Zapolskiy 2016-03-06 03:22:04 +02:00 • committed by Greg Kroah-Hartman
commit 75efb5fe5c
2 changed files with 4 additions and 4 deletions