summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRui Miguel Silva <rui.silva@linaro.org>2017-12-12 14:08:18 +0000
committerRui Miguel Silva <rui.silva@linaro.org>2017-12-12 15:06:49 +0000
commit5db494e98fb768a8bb5a93ec3fa71b1a48bda7c5 (patch)
treee3b1602a3cc3197ce5a2ecad9eecf415de8b7657
parenta9a79e1e82ea0a9d4ab7cf37fdbffe94c96d1f6d (diff)
caam: fix null dereference at error pathlinaro-20171212-001
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. Tested-by: Ryan Harkin <ryan.harkin@linaro.org> Signed-off-by: Rui Miguel Silva <rui.silva@linaro.org>
-rw-r--r--drivers/crypto/caam/ctrl.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/crypto/caam/ctrl.c b/drivers/crypto/caam/ctrl.c
index 027e121c6f70..98986d3773f1 100644
--- a/drivers/crypto/caam/ctrl.c
+++ b/drivers/crypto/caam/ctrl.c
@@ -809,9 +809,6 @@ static int caam_probe(struct platform_device *pdev)
return 0;
caam_remove:
-#ifdef CONFIG_DEBUG_FS
- debugfs_remove_recursive(ctrlpriv->dfs_root);
-#endif
caam_remove(pdev);
return ret;