]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: atmel - fix checks of error code returned by devm_ioremap_resource()
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Fri, 5 Feb 2016 12:45:12 +0000 (13:45 +0100)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:46:42 +0000 (15:46 -0700)
commit92676cb0ed2d3014fd30b097c72aee6257a6d762
treecb6607dcba8b2be213ea0b9b59cc8a287127764e
parent00b1da141ccd19111021c97a4758d4840ef2da04
crypto: atmel - fix checks of error code returned by devm_ioremap_resource()

Orabug: stable_rc4

[ Upstream commit 9b52d55f4f0e2bb9a34abbcf99e05e17f1b3b281 ]

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: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit a9e524e20d53b67328c1ba0301c19efae260a0a0)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
drivers/crypto/atmel-sha.c