crypto: ccree - Remove a useless dma_supported() call
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 20 Jul 2022 13:28:44 +0000 (15:28 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 29 Jul 2022 10:29:16 +0000 (18:29 +0800)
commit383ce25dd2b117da0c092dc0b45e7ad0e9ffcbb2
tree1883dc15d4468813c11df58578baab6e33b4472b
parent96ec8dfdd094b7b2b015e092d581835a732949ff
crypto: ccree - Remove a useless dma_supported() call

There is no point in calling dma_supported() before calling
dma_set_coherent_mask(). This function already calls dma_supported() and
returns an error (-EIO) if it fails.

So remove the superfluous dma_supported() call.

Moreover, setting a larger DMA mask will never fail when setting a smaller
one will succeed, so the whole "while" loop can be removed as well. (see
[1])

While at it, fix the name of the function reported in a dev_err().

[1]: https://lore.kernel.org/all/YteQ6Vx2C03UtCkG@infradead.org/

Suggested-by: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_driver.c