Commit 3e50191d981082345572f1e80b463eb9c05989a0
Committed by
Herbert Xu
1 parent
18c0ebd2d8
Exists in
master
and in
4 other branches
crypto: omap-aes - don't treat NULL clk as an error
clk_get() returns a struct clk cookie to the driver and some platforms may return NULL if they only support a single clock. clk_get() has only failed if it returns a ERR_PTR() encoded pointer. Signed-off-by: Jamie Iles <jamie@jamieiles.com> Reviewed-and-tested-by: Tobias Karnat <tobias.karnat@googlemail.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff
drivers/crypto/omap-aes.c
... | ... | @@ -839,9 +839,9 @@ |
839 | 839 | |
840 | 840 | /* Initializing the clock */ |
841 | 841 | dd->iclk = clk_get(dev, "ick"); |
842 | - if (!dd->iclk) { | |
842 | + if (IS_ERR(dd->iclk)) { | |
843 | 843 | dev_err(dev, "clock intialization failed.\n"); |
844 | - err = -ENODEV; | |
844 | + err = PTR_ERR(dd->iclk); | |
845 | 845 | goto err_res; |
846 | 846 | } |
847 | 847 |