Commit 40cdbe1a authored by Yeshaswi M R Gowda's avatar Yeshaswi M R Gowda Committed by Herbert Xu

crypto: chelsio - Check error code with IS_ERR macro

Check and return proper error code.
Signed-off-by: default avatarJitendra Lulla <jlulla@chelsio.com>
Signed-off-by: default avatarHarsh Jain <harsh@chelsio.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 570265bf
...@@ -1456,8 +1456,8 @@ static int chcr_ahash_update(struct ahash_request *req) ...@@ -1456,8 +1456,8 @@ static int chcr_ahash_update(struct ahash_request *req)
req_ctx->result = 0; req_ctx->result = 0;
req_ctx->data_len += params.sg_len + params.bfr_len; req_ctx->data_len += params.sg_len + params.bfr_len;
skb = create_hash_wr(req, &params); skb = create_hash_wr(req, &params);
if (!skb) if (IS_ERR(skb))
return -ENOMEM; return PTR_ERR(skb);
if (remainder) { if (remainder) {
u8 *temp; u8 *temp;
...@@ -1520,8 +1520,8 @@ static int chcr_ahash_final(struct ahash_request *req) ...@@ -1520,8 +1520,8 @@ static int chcr_ahash_final(struct ahash_request *req)
params.more = 0; params.more = 0;
} }
skb = create_hash_wr(req, &params); skb = create_hash_wr(req, &params);
if (!skb) if (IS_ERR(skb))
return -ENOMEM; return PTR_ERR(skb);
skb->dev = u_ctx->lldi.ports[0]; skb->dev = u_ctx->lldi.ports[0];
set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx); set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx);
...@@ -1571,8 +1571,8 @@ static int chcr_ahash_finup(struct ahash_request *req) ...@@ -1571,8 +1571,8 @@ static int chcr_ahash_finup(struct ahash_request *req)
} }
skb = create_hash_wr(req, &params); skb = create_hash_wr(req, &params);
if (!skb) if (IS_ERR(skb))
return -ENOMEM; return PTR_ERR(skb);
skb->dev = u_ctx->lldi.ports[0]; skb->dev = u_ctx->lldi.ports[0];
set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx); set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx);
...@@ -1622,8 +1622,8 @@ static int chcr_ahash_digest(struct ahash_request *req) ...@@ -1622,8 +1622,8 @@ static int chcr_ahash_digest(struct ahash_request *req)
} }
skb = create_hash_wr(req, &params); skb = create_hash_wr(req, &params);
if (!skb) if (IS_ERR(skb))
return -ENOMEM; return PTR_ERR(skb);
skb->dev = u_ctx->lldi.ports[0]; skb->dev = u_ctx->lldi.ports[0];
set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx); set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_qidx);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment