Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Rosen Penev <rosenp@gmail.com>
Cc: linux-crypto@vger.kernel.org,
	Srujana Challa <schalla@marvell.com>,
	Bharat Bhushan <bbhushan2@marvell.com>,
	"David S. Miller" <davem@davemloft.net>,
	Boris Brezillon <bbrezillon@kernel.org>,
	Robin Murphy <robin.murphy@arm.com>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCHv2] crypto: cesa: check for sram_dma error
Date: Mon, 27 Jul 2026 10:25:16 +1000	[thread overview]
Message-ID: <amalbOVzL4gCWS99@gondor.apana.org.au> (raw)
In-Reply-To: <20260717225831.1085313-1-rosenp@gmail.com>

On Fri, Jul 17, 2026 at 03:58:31PM -0700, Rosen Penev wrote:
> dma_map_resource() might fail. In such a case, don't call
> dma_unmap_resource()
> 
> Fixes: 37d728f76c41 ("crypto: marvell/cesa - Fix DMA API misuse")
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  v2: use dma_mapping_error(). Fix Fixes tag.
>  drivers/crypto/marvell/cesa/cesa.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

I think it would be better to fix mv_cesa_probe to not call the
cleanup functions on uninitialised engines.

err_cleanup:
	for (i = 0; i < XXX; i++)
		mv_cesa_put_sram(pdev, i);

So replace XXX here with one past the last index that was successfully
initialised.

Cheers,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

  reply	other threads:[~2026-07-27  0:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-17 22:58 [PATCHv2] crypto: cesa: check for sram_dma error Rosen Penev
2026-07-27  0:25 ` Herbert Xu [this message]
2026-07-27 12:37 ` Robin Murphy

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=amalbOVzL4gCWS99@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=bbhushan2@marvell.com \
    --cc=bbrezillon@kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robin.murphy@arm.com \
    --cc=rosenp@gmail.com \
    --cc=schalla@marvell.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