]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: caam - Fix null dereference at error path
authorRui Miguel Silva <rui.silva@linaro.org>
Thu, 22 Feb 2018 14:22:47 +0000 (14:22 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Mar 2018 16:03:39 +0000 (00:03 +0800)
commit8ef9d5a2ade41891f7a937e27391d0344a5a928e
treecd13a2d6b070c0f81346d957288a8c858bc2c6a9
parent1204b4bf7d70d026b6d13a1d4ae72f65103c8d9c
crypto: caam - Fix null dereference at error path

caam_remove already removes the debugfs entry, so we need to remove the one
immediately before calling caam_remove.

This fix a NULL dereference at error paths is caam_probe fail.

Fixes: 8df5bce3b12a ("crypto: caam - add Queue Interface (QI) backend support")
Tested-by: Ryan Harkin <ryan.harkin@linaro.org>
Cc: "Horia Geantă" <horia.geanta@nxp.com>
Cc: Aymen Sghaier <aymen.sghaier@nxp.com>
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Cc: Peng Fan <peng.fan@nxp.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Cc: <stable@vger.kernel.org> # 4.12+
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/ctrl.c