]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccp - Ignore unconfigured CCP device on suspend/resume
authorGary R Hook <gary.hook@amd.com>
Mon, 19 Aug 2019 22:23:27 +0000 (22:23 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 22 Aug 2019 04:22:43 +0000 (14:22 +1000)
commit0916afca99b7071a4efd5b2ad008a524da77f43c
tree3878ea58fe8485d3dee5e3c1f89226734f24e367
parentbc31d8b27a74fdbe6facae2d7239e83bd951b66f
crypto: ccp - Ignore unconfigured CCP device on suspend/resume

If a CCP is unconfigured (e.g. there are no available queues) then
there will be no data structures allocated for the device. Thus, we
must check for validity of a pointer before trying to access structure
members.

Fixes: 501c1c395ec0f ("crypto: ccp - Introduce the AMD Secure Processor device")
Cc: <stable@vger.kernel.org>
Signed-off-by: Gary R Hook <gary.hook@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-dev.c