From: Tero Kristo <t-kristo@ti.com>
To: Krzysztof Kozlowski <krzk@kernel.org>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
Vladimir Zapolskiy <vz@mleia.com>,
Kamil Konieczny <k.konieczny@partner.samsung.com>,
<linux-crypto@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-samsung-soc@vger.kernel.org>
Subject: Re: [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request
Date: Mon, 5 Mar 2018 10:58:57 +0200 [thread overview]
Message-ID: <4062df04-e605-60c1-0cab-2d519efdc4b1@ti.com> (raw)
In-Reply-To: <1519937413-24468-1-git-send-email-krzk@kernel.org>
On 01/03/18 22:50, Krzysztof Kozlowski wrote:
> ahash_request 'req' argument passed by the caller
> omap_sham_handle_queue() cannot be NULL here because it is obtained from
> non-NULL pointer via container_of().
>
> This fixes smatch warning:
> drivers/crypto/omap-sham.c:812 omap_sham_prepare_request() warn: variable dereferenced before check 'req' (see line 805)
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Tero Kristo <t-kristo@ti.com>
> ---
> drivers/crypto/omap-sham.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
> index 86b89ace836f..7650b1b449bb 100644
> --- a/drivers/crypto/omap-sham.c
> +++ b/drivers/crypto/omap-sham.c
> @@ -809,9 +809,6 @@ static int omap_sham_prepare_request(struct ahash_request *req, bool update)
> bool final = rctx->flags & BIT(FLAGS_FINUP);
> int xmit_len, hash_later;
>
> - if (!req)
> - return 0;
> -
> bs = get_block_size(rctx);
>
> if (update)
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2018-03-05 8:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-01 20:50 [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request Krzysztof Kozlowski
2018-03-01 20:50 ` [PATCH 2/4] crypto: omap-sham - Fix misleading indentation Krzysztof Kozlowski
2018-03-05 8:59 ` Tero Kristo
2018-03-01 20:50 ` [PATCH 3/4] crypto: s5p-sss: Remove useless check for non-null request Krzysztof Kozlowski
2018-03-01 20:50 ` [PATCH 4/4] crypto: s5p-sss - Constify pointed data (arguments and local variables) Krzysztof Kozlowski
2018-03-05 8:58 ` Tero Kristo [this message]
2018-03-09 15:19 ` [PATCH 1/4] crypto: omap-sham: Remove useless check for non-null request 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=4062df04-e605-60c1-0cab-2d519efdc4b1@ti.com \
--to=t-kristo@ti.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=k.konieczny@partner.samsung.com \
--cc=krzk@kernel.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=vz@mleia.com \
/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