From e9ce6aee1d4d0ae61bf9e1666d790394c4f4d1a8 Mon Sep 17 00:00:00 2001 From: Tudor Ambarus Date: Fri, 13 Dec 2019 09:54:54 +0000 Subject: [PATCH] crypto: atmel-{sha,tdes} - Print warn message even when deferring Even when deferring, we would like to know what caused it. Update dev_warn to dev_err because if the DMA init fails, the probe is stopped. Signed-off-by: Tudor Ambarus Signed-off-by: Herbert Xu --- drivers/crypto/atmel-aes.c | 2 +- drivers/crypto/atmel-sha.c | 7 ++----- drivers/crypto/atmel-tdes.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 986f1ca682aa..855f0ccc9368 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2292,7 +2292,7 @@ static int atmel_aes_dma_init(struct atmel_aes_dev *dd) err_dma_out: dma_release_channel(dd->src.chan); err_dma_in: - dev_warn(dd->dev, "no DMA channel available\n"); + dev_err(dd->dev, "no DMA channel available\n"); return ret; } diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index a0d42bdc311f..e8e4200c1ab3 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2485,11 +2485,8 @@ static int atmel_sha_dma_init(struct atmel_sha_dev *dd) { dd->dma_lch_in.chan = dma_request_chan(dd->dev, "tx"); if (IS_ERR(dd->dma_lch_in.chan)) { - int ret = PTR_ERR(dd->dma_lch_in.chan); - - if (ret != -EPROBE_DEFER) - dev_warn(dd->dev, "no DMA channel available\n"); - return ret; + dev_err(dd->dev, "DMA channel is not available\n"); + return PTR_ERR(dd->dma_lch_in.chan); } dd->dma_lch_in.dma_conf.dst_addr = dd->phys_base + diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index d42b22775ee9..83a6d42c8921 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -783,8 +783,7 @@ static int atmel_tdes_dma_init(struct atmel_tdes_dev *dd) err_dma_out: dma_release_channel(dd->dma_lch_in.chan); err_dma_in: - if (ret != -EPROBE_DEFER) - dev_warn(dd->dev, "no DMA channel available\n"); + dev_err(dd->dev, "no DMA channel available\n"); return ret; }