提交 d462e322 编写于 作者: D Dan Carpenter 提交者: 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: NDan Carpenter <dan.carpenter@oracle.com>
Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
上级 4a6b27b7
......@@ -1986,7 +1986,7 @@ static int omap_sham_probe(struct platform_device *pdev)
&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");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册