crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
authorVladimir Zapolskiy <vz@mleia.com>
Sun, 6 Mar 2016 01:21:52 +0000 (03:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Apr 2016 16:08:46 +0000 (09:08 -0700)
commit90933f3fb612574e326f9872c5bd2121f8e2da39
tree791fff1ae0af69f9cf944ae959f632b276c0e58f
parentf69c1b51f6da629e6f03b336ffec8c31b56e6f8a
crypto: atmel - fix checks of error code returned by devm_ioremap_resource()

commit 9b52d55f4f0e2bb9a34abbcf99e05e17f1b3b281 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: b0e8b3417a62 ("crypto: atmel - 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/atmel-aes.c
drivers/crypto/atmel-sha.c
drivers/crypto/atmel-tdes.c