diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-05-18 13:39:05 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2016-05-19 18:03:00 +0800 |
commit | d462e32259810aaaf13440b033b99e1aad33eccd (patch) | |
tree | d716d7535e55f9ffa3a680dcc48901d3b31d46f3 | |
parent | 4a6b27b79da5ccc6b85dc05bbe6a091e58be896a (diff) | |
download | op-kernel-dev-d462e32259810aaaf13440b033b99e1aad33eccd.zip op-kernel-dev-d462e32259810aaaf13440b033b99e1aad33eccd.tar.gz |
crypto: omap-sham - potential Oops on error in probe
This if statement is reversed so we end up either leaking or Oopsing on
error.
Fixes: dbe246209bc1 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/omap-sham.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c index 6eefaa2..63464e8 100644 --- a/drivers/crypto/omap-sham.c +++ b/drivers/crypto/omap-sham.c @@ -1986,7 +1986,7 @@ err_algs: &dd->pdata->algs_info[i].algs_list[j]); err_pm: pm_runtime_disable(dev); - if (dd->polling_mode) + if (!dd->polling_mode) dma_release_channel(dd->dma_lch); data_err: dev_err(dev, "initialization failed.\n"); |