Commit d462e322 authored by Dan Carpenter's avatar Dan Carpenter Committed by Herbert Xu

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: dbe24620 ('crypto: omap-sham - Use dma_request_chan() for requesting DMA channel')
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Acked-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 4a6b27b7
...@@ -1986,7 +1986,7 @@ static int omap_sham_probe(struct platform_device *pdev) ...@@ -1986,7 +1986,7 @@ static int omap_sham_probe(struct platform_device *pdev)
&dd->pdata->algs_info[i].algs_list[j]); &dd->pdata->algs_info[i].algs_list[j]);
err_pm: err_pm:
pm_runtime_disable(dev); pm_runtime_disable(dev);
if (dd->polling_mode) if (!dd->polling_mode)
dma_release_channel(dd->dma_lch); dma_release_channel(dd->dma_lch);
data_err: data_err:
dev_err(dev, "initialization failed.\n"); dev_err(dev, "initialization failed.\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment