mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 14:53:58 -04:00
crypto: hisilicon - fix the check on dma address
System may be able to get physical address of zero if not reserved by firmware. The dma address obtained by 'dma_alloc_coherent' is valid, since already checking cpu va before, so do not check again. Signed-off-by: Hui Tang <tanghui20@huawei.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -708,12 +708,6 @@ static int sec_cipher_pbuf_map(struct sec_ctx *ctx, struct sec_req *req,
|
||||
}
|
||||
|
||||
c_req->c_in_dma = qp_ctx->res[req_id].pbuf_dma;
|
||||
|
||||
if (!c_req->c_in_dma) {
|
||||
dev_err(dev, "fail to set pbuffer address!\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
c_req->c_out_dma = c_req->c_in_dma;
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user