diff options
author | Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | 2017-10-23 18:34:39 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 17:11:23 +0300 |
commit | 3c88761e8a7bee9252c6ed1e2552eb0cfefa521d (patch) | |
tree | 3287e45db155891157dfeed6dcea5f1c62639d94 /drivers/crypto/atmel-sha.c | |
parent | aba973c69e3658e3190d8983eed7dddd3c44dd1e (diff) | |
download | linux-3c88761e8a7bee9252c6ed1e2552eb0cfefa521d.tar.xz |
crypto: atmel - return appropriate error code
Return -ENODEV when dma_request_slave_channel_compat() fails.
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-sha.c')
-rw-r--r-- | drivers/crypto/atmel-sha.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/atmel-sha.c b/drivers/crypto/atmel-sha.c index 3e2f41b3eaf3..42c1f7479ab6 100644 --- a/drivers/crypto/atmel-sha.c +++ b/drivers/crypto/atmel-sha.c @@ -2628,7 +2628,6 @@ static bool atmel_sha_filter(struct dma_chan *chan, void *slave) static int atmel_sha_dma_init(struct atmel_sha_dev *dd, struct crypto_platform_data *pdata) { - int err = -ENOMEM; dma_cap_mask_t mask_in; /* Try to grab DMA channel */ @@ -2639,7 +2638,7 @@ static int atmel_sha_dma_init(struct atmel_sha_dev *dd, atmel_sha_filter, &pdata->dma_slave->rxdata, dd->dev, "tx"); if (!dd->dma_lch_in.chan) { dev_warn(dd->dev, "no DMA channel available\n"); - return err; + return -ENODEV; } dd->dma_lch_in.dma_conf.direction = DMA_MEM_TO_DEV; |