platform: msm_shared: Reset BAM pipes as part of crypto engine cleanup.

CRs-Fixed: 514914
diff --git a/platform/msm_shared/crypto5_eng.c b/platform/msm_shared/crypto5_eng.c
index ed5c8ad..3fecd61 100644
--- a/platform/msm_shared/crypto5_eng.c
+++ b/platform/msm_shared/crypto5_eng.c
@@ -466,6 +466,10 @@
 {
 	CLEAR_STATUS(dev);
 
+	/* reset the pipes. */
+	bam_pipe_reset(&(dev->bam), CRYPTO_READ_PIPE_INDEX);
+	bam_pipe_reset(&(dev->bam), CRYPTO_WRITE_PIPE_INDEX);
+
 	/* Free all related memory. */
 	free(dev->dump);
 	free(dev->ce_array);