diff options
author | Tudor-Dan Ambarus <tudor.ambarus@microchip.com> | 2017-10-23 17:34:39 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-11-03 15:11:23 +0100 |
commit | 3c88761e8a7bee9252c6ed1e2552eb0cfefa521d (patch) | |
tree | 3287e45db155891157dfeed6dcea5f1c62639d94 /drivers/crypto/atmel-aes.c | |
parent | crypto: doc - adapt api sample to use async. op wait (diff) | |
download | linux-3c88761e8a7bee9252c6ed1e2552eb0cfefa521d.tar.xz linux-3c88761e8a7bee9252c6ed1e2552eb0cfefa521d.zip |
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-aes.c')
-rw-r--r-- | drivers/crypto/atmel-aes.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c index 903fd43f23a5..9659759dcba9 100644 --- a/drivers/crypto/atmel-aes.c +++ b/drivers/crypto/atmel-aes.c @@ -2383,7 +2383,6 @@ static int atmel_aes_dma_init(struct atmel_aes_dev *dd, struct crypto_platform_data *pdata) { struct at_dma_slave *slave; - int err = -ENOMEM; dma_cap_mask_t mask; dma_cap_zero(mask); @@ -2408,7 +2407,7 @@ err_dma_out: dma_release_channel(dd->src.chan); err_dma_in: dev_warn(dd->dev, "no DMA channel available\n"); - return err; + return -ENODEV; } static void atmel_aes_dma_cleanup(struct atmel_aes_dev *dd) |