mirror of
https://github.com/torvalds/linux.git
synced 2024-12-15 07:33:56 +00:00
crypto: chcr - Fix Smatch Complaint
Initialise variable after null check. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Harsh Jain <harsh@chelsio.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
d2826056cb
commit
5ba042c094
5
drivers/crypto/chelsio/chcr_algo.c
Normal file → Executable file
5
drivers/crypto/chelsio/chcr_algo.c
Normal file → Executable file
@ -2456,13 +2456,14 @@ static int chcr_aead_op(struct aead_request *req,
|
|||||||
{
|
{
|
||||||
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
|
struct crypto_aead *tfm = crypto_aead_reqtfm(req);
|
||||||
struct chcr_context *ctx = crypto_aead_ctx(tfm);
|
struct chcr_context *ctx = crypto_aead_ctx(tfm);
|
||||||
struct uld_ctx *u_ctx = ULD_CTX(ctx);
|
struct uld_ctx *u_ctx;
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
|
|
||||||
if (ctx && !ctx->dev) {
|
if (!ctx->dev) {
|
||||||
pr_err("chcr : %s : No crypto device.\n", __func__);
|
pr_err("chcr : %s : No crypto device.\n", __func__);
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
u_ctx = ULD_CTX(ctx);
|
||||||
if (cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0],
|
if (cxgb4_is_crypto_q_full(u_ctx->lldi.ports[0],
|
||||||
ctx->tx_channel_id)) {
|
ctx->tx_channel_id)) {
|
||||||
if (!(req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
|
if (!(req->base.flags & CRYPTO_TFM_REQ_MAY_BACKLOG))
|
||||||
|
Loading…
Reference in New Issue
Block a user