Commit e9ce6aee authored by Tudor Ambarus's avatar Tudor Ambarus Committed by Herbert Xu

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: default avatarTudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 827a98df
...@@ -2292,7 +2292,7 @@ static int atmel_aes_dma_init(struct atmel_aes_dev *dd) ...@@ -2292,7 +2292,7 @@ static int atmel_aes_dma_init(struct atmel_aes_dev *dd)
err_dma_out: err_dma_out:
dma_release_channel(dd->src.chan); dma_release_channel(dd->src.chan);
err_dma_in: err_dma_in:
dev_warn(dd->dev, "no DMA channel available\n"); dev_err(dd->dev, "no DMA channel available\n");
return ret; return ret;
} }
......
...@@ -2485,11 +2485,8 @@ static int atmel_sha_dma_init(struct atmel_sha_dev *dd) ...@@ -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"); dd->dma_lch_in.chan = dma_request_chan(dd->dev, "tx");
if (IS_ERR(dd->dma_lch_in.chan)) { if (IS_ERR(dd->dma_lch_in.chan)) {
int ret = PTR_ERR(dd->dma_lch_in.chan); dev_err(dd->dev, "DMA channel is not available\n");
return PTR_ERR(dd->dma_lch_in.chan);
if (ret != -EPROBE_DEFER)
dev_warn(dd->dev, "no DMA channel available\n");
return ret;
} }
dd->dma_lch_in.dma_conf.dst_addr = dd->phys_base + dd->dma_lch_in.dma_conf.dst_addr = dd->phys_base +
......
...@@ -783,8 +783,7 @@ static int atmel_tdes_dma_init(struct atmel_tdes_dev *dd) ...@@ -783,8 +783,7 @@ static int atmel_tdes_dma_init(struct atmel_tdes_dev *dd)
err_dma_out: err_dma_out:
dma_release_channel(dd->dma_lch_in.chan); dma_release_channel(dd->dma_lch_in.chan);
err_dma_in: err_dma_in:
if (ret != -EPROBE_DEFER) dev_err(dd->dev, "no DMA channel available\n");
dev_warn(dd->dev, "no DMA channel available\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment