diff options
author | Dan Douglass <dan.douglass@freescale.com> | 2016-03-11 17:17:40 -0600 |
---|---|---|
committer | Dan Douglass <dan.douglass@freescale.com> | 2016-03-11 18:21:23 -0600 |
commit | b5ef86a922d7186d3e86758a6a06ef19594af723 (patch) | |
tree | c4f7ae8c021a6ea265b9672372f516de3da8b55e /drivers/crypto | |
parent | 84a7b5abf8122059547e096501b47a83ec7a781b (diff) |
MLK-12475 CAAM: sg pointer updated instead of local copy
Correct error in CAAM driver port. dma_map_sg_chained() had a patch
applied to traverse the sg list using a local copy to prevent
changing the value of the passed in sg list pointer.
Signed-off-by: Dan Douglass <dan.douglass@nxp.com>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/caam/sg_sw_sec4.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/crypto/caam/sg_sw_sec4.h b/drivers/crypto/caam/sg_sw_sec4.h index 70af42dc531a..d0f7ecbfdca3 100644 --- a/drivers/crypto/caam/sg_sw_sec4.h +++ b/drivers/crypto/caam/sg_sw_sec4.h @@ -1,7 +1,7 @@ /* * CAAM/SEC 4.x functions for using scatterlists in caam driver * - * Copyright 2008-2015 Freescale Semiconductor, Inc. + * Copyright 2008-2016 Freescale Semiconductor, Inc. * */ @@ -91,14 +91,14 @@ static int dma_map_sg_chained(struct device *dev, struct scatterlist *sg, { if (unlikely(chained)) { int i; - struct scatterlist *tsg = sg; + struct scatterlist *tsg = sg; /* We use a local copy of the sg pointer to avoid moving the * head of the list pointed to by sg as we wall the list. */ for (i = 0; i < nents; i++) { dma_map_sg(dev, tsg, 1, dir); - sg = sg_next(tsg); + tsg = sg_next(tsg); } } else { dma_map_sg(dev, sg, nents, dir); |