crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()
authorVladimir Zapolskiy <vz@mleia.com>
Sun, 6 Mar 2016 01:22:04 +0000 (03:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:08:46 +0000 (09:08 -0700)
commit75efb5fe5ce23f72ef8641f593b5829152c6203c
tree3a63905d191bc6a74613bdd32bcb29d69e937d69
parent90933f3fb612574e326f9872c5bd2121f8e2da39
crypto: ux500 - fix checks of error code returned by devm_ioremap_resource()

commit b62917a2622ebcb03a500ef20da47be80d8c8951 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: 5a4eea2658c93 ("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>
drivers/crypto/ux500/cryp/cryp_core.c
drivers/crypto/ux500/hash/hash_core.c