diff mbox series

crypto: caam: fix caam_dump_sg that iterates through scatterlist

Message ID 1557236223-31492-1-git-send-email-iuliana.prodan@nxp.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: caam: fix caam_dump_sg that iterates through scatterlist | expand

Commit Message

Iuliana Prodan May 7, 2019, 1:37 p.m. UTC
Fix caam_dump_sg by correctly determining the next scatterlist
entry in the list.

Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump")
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
---
 drivers/crypto/caam/error.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Horia Geanta May 7, 2019, 2:30 p.m. UTC | #1
On 5/7/2019 4:37 PM, Iuliana Prodan wrote:
> Fix caam_dump_sg by correctly determining the next scatterlist
> entry in the list.
> 
> Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump")
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
Reviewed-by: Horia Geantă <horia.geanta@nxp.com>

Thanks,
Horia
Herbert Xu May 9, 2019, 5:25 a.m. UTC | #2
On Tue, May 07, 2019 at 04:37:03PM +0300, Iuliana Prodan wrote:
> Fix caam_dump_sg by correctly determining the next scatterlist
> entry in the list.
> 
> Fixes: 5ecf8ef9103c ("crypto: caam - fix sg dump")
> Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
> ---
>  drivers/crypto/caam/error.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Patch applied.  Thanks.
diff mbox series

Patch

diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c
index 21a70fd..7c9fb63 100644
--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -22,7 +22,7 @@  void caam_dump_sg(const char *level, const char *prefix_str, int prefix_type,
 	size_t len;
 	void *buf;
 
-	for (it = sg; it && tlen > 0 ; it = sg_next(sg)) {
+	for (it = sg; it && tlen > 0 ; it = sg_next(it)) {
 		/*
 		 * make sure the scatterlist's page
 		 * has a valid virtual memory mapping