From: Iuliana Prodan Date: Tue, 7 May 2019 13:37:03 +0000 (+0300) Subject: crypto: caam - fix caam_dump_sg that iterates through scatterlist X-Git-Tag: v5.4-rc1~707^2~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c65d35435e8cbfdf953cafe5ebe3648ee9276a2;p=platform%2Fkernel%2Flinux-rpi.git crypto: caam - fix caam_dump_sg that iterates through scatterlist 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 Reviewed-by: Horia Geantă Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/caam/error.c b/drivers/crypto/caam/error.c index a4129a3..4da844e 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