From feb441cd22514717d96c23fe38410a965d0d599c Mon Sep 17 00:00:00 2001 From: Gagandeep Singh Date: Mon, 29 Oct 2018 12:15:51 +0000 Subject: [PATCH] crypto/caam_jr: fix check before job ring freeing Check should be on parameter uio_fd instead of local variable job_ring Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations") Reported-by: Ferruh Yigit Signed-off-by: Gagandeep Singh Acked-by: Akhil Goyal --- drivers/crypto/caam_jr/caam_jr_uio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c index c07d9db015..d94101c2ff 100644 --- a/drivers/crypto/caam_jr/caam_jr_uio.c +++ b/drivers/crypto/caam_jr/caam_jr_uio.c @@ -332,7 +332,7 @@ free_job_ring(uint32_t uio_fd) struct uio_job_ring *job_ring = NULL; int i; - if (!job_ring->uio_fd) + if (!uio_fd) return; for (i = 0; i < MAX_SEC_JOB_RINGS; i++) { -- 2.20.1