From: Roman Smirnov <r.smirnov@omp.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>
Cc: Roman Smirnov <r.smirnov@omp.ru>,
Sergey Shtylyov <s.shtylyov@omp.ru>,
Karina Yankevich <k.yankevich@omp.ru>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<lvc-project@linuxtesting.org>
Subject: [PATCH] crypto: algboss: remove NULL check in cryptomgr_schedule_probe()
Date: Wed, 6 Mar 2024 10:29:08 +0300 [thread overview]
Message-ID: <20240306072908.5234-1-r.smirnov@omp.ru> (raw)
The variable i will never be zero, so the check can be removed.
Found by Linux Verification Center (linuxtesting.org) with Svace.
Signed-off-by: Roman Smirnov <r.smirnov@omp.ru>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
---
crypto/algboss.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/crypto/algboss.c b/crypto/algboss.c
index 0de1e6697949..1aa5f306998a 100644
--- a/crypto/algboss.c
+++ b/crypto/algboss.c
@@ -138,9 +138,6 @@ static int cryptomgr_schedule_probe(struct crypto_larval *larval)
goto err_free_param;
}
- if (!i)
- goto err_free_param;
-
param->tb[i + 1] = NULL;
param->type.attr.rta_len = sizeof(param->type);
--
2.34.1
next reply other threads:[~2024-03-06 7:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 7:29 Roman Smirnov [this message]
2024-03-28 10:00 ` [PATCH] crypto: algboss: remove NULL check in cryptomgr_schedule_probe() Herbert Xu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306072908.5234-1-r.smirnov@omp.ru \
--to=r.smirnov@omp.ru \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=k.yankevich@omp.ru \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=s.shtylyov@omp.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).