diff options
author | LABBE Corentin <clabbe.montjoie@gmail.com> | 2015-10-02 14:12:58 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-10-08 21:42:21 +0800 |
commit | 9d83d299549d0e121245d56954242750d0c14338 (patch) | |
tree | 62abe7e8947f5b24e20371dd34b0fb9ef970c308 /drivers/crypto/atmel-tdes.c | |
parent | c6415a6016bff0b547c13cadb1d5e50e9ace2be3 (diff) | |
download | talos-obmc-linux-9d83d299549d0e121245d56954242750d0c14338.tar.gz talos-obmc-linux-9d83d299549d0e121245d56954242750d0c14338.zip |
crypto: atmel - Check for clk_prepare_enable() return value
clk_prepare_enable() can fail so add a check for this and
return the error code if it fails.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-tdes.c')
-rw-r--r-- | drivers/crypto/atmel-tdes.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-tdes.c b/drivers/crypto/atmel-tdes.c index ca2999709eb4..504e90340074 100644 --- a/drivers/crypto/atmel-tdes.c +++ b/drivers/crypto/atmel-tdes.c @@ -218,7 +218,11 @@ static struct atmel_tdes_dev *atmel_tdes_find_dev(struct atmel_tdes_ctx *ctx) static int atmel_tdes_hw_init(struct atmel_tdes_dev *dd) { - clk_prepare_enable(dd->iclk); + int err; + + err = clk_prepare_enable(dd->iclk); + if (err) + return err; if (!(dd->flags & TDES_FLAGS_INIT)) { atmel_tdes_write(dd, TDES_CR, TDES_CR_SWRST); |