summaryrefslogtreecommitdiff
path: root/drivers/crypto/omap-sham.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-05-18 13:39:05 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2016-05-19 13:03:00 +0300
commitd462e32259810aaaf13440b033b99e1aad33eccd (patch)
treed716d7535e55f9ffa3a680dcc48901d3b31d46f3 /drivers/crypto/omap-sham.c
parent4a6b27b79da5ccc6b85dc05bbe6a091e58be896a (diff)
downloadlinux-d462e32259810aaaf13440b033b99e1aad33eccd.tar.xz
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>
Diffstat (limited to 'drivers/crypto/omap-sham.c')
-rw-r--r--drivers/crypto/omap-sham.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 6eefaa2fe58f..63464e86f2b1 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");