crypto/caam_jr: fix incorrect check

Message ID 20181029121511.7433-1-g.singh@nxp.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers
Series crypto/caam_jr: fix incorrect check |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK

Commit Message

Gagandeep Singh Oct. 29, 2018, 12:15 p.m. UTC
  Check should be on parameter uio_fd instead of
local variable job_ring

Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
---
changes:
 * fixed incorrect check in free_job_ring (comment by Ferruh)

 drivers/crypto/caam_jr/caam_jr_uio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Akhil Goyal Nov. 2, 2018, 11:28 a.m. UTC | #1
On 10/29/2018 5:45 PM, Gagandeep Singh wrote:
> Check should be on parameter uio_fd instead of
> local variable job_ring
>
> Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")
>
> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
> ---
> changes:
>   * fixed incorrect check in free_job_ring (comment by Ferruh)
You should add Reported-by
Will add it while merging.

Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
  
Akhil Goyal Nov. 2, 2018, 11:33 a.m. UTC | #2
On 11/2/2018 4:58 PM, Akhil Goyal wrote:
>
> On 10/29/2018 5:45 PM, Gagandeep Singh wrote:
>> Check should be on parameter uio_fd instead of
>> local variable job_ring
>>
>> Fixes: e7a45f3cc2 ("crypto/caam_jr: add UIO specific operations")
>>
>> Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
>> ---
>> changes:
>>    * fixed incorrect check in free_job_ring (comment by Ferruh)
> You should add Reported-by
> Will add it while merging.
>
> Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Applied to dpdk-next-crypto

Thanks
  

Patch

diff --git a/drivers/crypto/caam_jr/caam_jr_uio.c b/drivers/crypto/caam_jr/caam_jr_uio.c
index c07d9db01..d94101c2f 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++) {