crypto: Fix initialization of array variable.
There are currently two issues recently observed:
-An array variable is not initialized.
-The 'podev' structure is currently being de-referenced without
verifying if it is NULL or not. Doing that could cause a crash.
This has not been seen before and it is pre-emptive.
Change-Id: I42440d6efc9593bd8f5807a6ffda6a4b2e71818c
Signed-off-by: Ramesh Masavarapu <rameshm@codeaurora.org>
diff --git a/drivers/crypto/msm/qcedev.c b/drivers/crypto/msm/qcedev.c
index fff494c..2a191d5 100644
--- a/drivers/crypto/msm/qcedev.c
+++ b/drivers/crypto/msm/qcedev.c
@@ -352,7 +352,7 @@
}
kzfree(handle);
file->private_data = NULL;
- if (podev->platform_support.bus_scale_table != NULL)
+ if (podev != NULL && podev->platform_support.bus_scale_table != NULL)
qcedev_ce_high_bw_req(podev, false);
return 0;
}