On 02-12-2016 11:29, Harsh Jain wrote: > > On 02-12-2016 02:19, Dan Carpenter wrote: >> The create_hash_wr() function never returns error pointers. It returns >> NULL on error. > Will fix the same, Thanks It's a patch mail not bug reporting! Sorry for confusion. You have already fixed it. Thanks. >> Fixes: 358961d1cd1e ("crypto: chcr - Added new structure chcr_wr") >> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> >> >> diff --git a/drivers/crypto/chelsio/chcr_algo.c b/drivers/crypto/chelsio/chcr_algo.c >> index 32361dd..2ed1e24 100644 >> --- a/drivers/crypto/chelsio/chcr_algo.c >> +++ b/drivers/crypto/chelsio/chcr_algo.c >> @@ -958,9 +958,8 @@ static int chcr_ahash_update(struct ahash_request *req) >> req_ctx->result = 0; >> req_ctx->data_len += params.sg_len + params.bfr_len; >> skb = create_hash_wr(req, ¶ms); >> - >> - if (IS_ERR(skb)) >> - return PTR_ERR(skb); >> + if (!skb) >> + return -ENOMEM; >> >> if (remainder) { >> u8 *temp; >> @@ -1023,8 +1022,8 @@ static int chcr_ahash_final(struct ahash_request *req) >> params.more = 0; >> } >> skb = create_hash_wr(req, ¶ms); >> - if (IS_ERR(skb)) >> - return PTR_ERR(skb); >> + if (!skb) >> + return -ENOMEM; >> >> skb->dev = u_ctx->lldi.ports[0]; >> set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_channel_id); >> @@ -1074,8 +1073,8 @@ static int chcr_ahash_finup(struct ahash_request *req) >> } >> >> skb = create_hash_wr(req, ¶ms); >> - if (IS_ERR(skb)) >> - return PTR_ERR(skb); >> + if (!skb) >> + return -ENOMEM; >> >> skb->dev = u_ctx->lldi.ports[0]; >> set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_channel_id); >> @@ -1125,8 +1124,8 @@ static int chcr_ahash_digest(struct ahash_request *req) >> } >> >> skb = create_hash_wr(req, ¶ms); >> - if (IS_ERR(skb)) >> - return PTR_ERR(skb); >> + if (!skb) >> + return -ENOMEM; >> >> skb->dev = u_ctx->lldi.ports[0]; >> set_wr_txq(skb, CPL_PRIORITY_DATA, ctx->tx_channel_id); -- To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html