[crypto] chcr: fix a type cast error
diff mbox

Message ID 1512469762-3757-1-git-send-email-atul.gupta@chelsio.com
State Accepted
Delegated to: Herbert Xu
Headers show

Commit Message

Atul Gupta Dec. 5, 2017, 10:29 a.m. UTC
fix a type cast error for queue descriptor

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
---
 drivers/crypto/chelsio/chcr_ipsec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Herbert Xu Dec. 22, 2017, 8:38 a.m. UTC | #1
Atul Gupta <atul.gupta@chelsio.com> wrote:
> fix a type cast error for queue descriptor
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>

Patch applied.  Thanks.

Patch
diff mbox

diff --git a/drivers/crypto/chelsio/chcr_ipsec.c b/drivers/crypto/chelsio/chcr_ipsec.c
index f90f991..a413156 100644
--- a/drivers/crypto/chelsio/chcr_ipsec.c
+++ b/drivers/crypto/chelsio/chcr_ipsec.c
@@ -428,7 +428,7 @@  inline void *copy_key_cpltx_pktxt(struct sk_buff *skb,
 			memcpy(pos, sa_entry->key, left);
 			memcpy(q->q.desc, sa_entry->key + left,
 			       key_len - left);
-			pos = q->q.desc + (key_len - left);
+			pos = (u8 *)q->q.desc + (key_len - left);
 		}
 	}
 	/* Copy CPL TX PKT XT */