lkml.org 
[lkml]   [2019]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2] staging: kpc2000: remove unnecessary assertion on priv
Date
In kpc_dma_transfer(), the assertion that priv is NULL is never
satisfied. The two callers of the function, dereference the priv
pointer before the call is executed. This patch removes the
unnecessary BUG_ON call.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
v1: Replace the recovery code by removing the assertion, as suggested
by Greg Kroah-Hartman.
---
drivers/staging/kpc2000/kpc_dma/fileops.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/staging/kpc2000/kpc_dma/fileops.c b/drivers/staging/kpc2000/kpc_dma/fileops.c
index cb52bd9a6d2f..61d762535823 100644
--- a/drivers/staging/kpc2000/kpc_dma/fileops.c
+++ b/drivers/staging/kpc2000/kpc_dma/fileops.c
@@ -49,7 +49,6 @@ static int kpc_dma_transfer(struct dev_private_data *priv,
u64 dma_addr;
u64 user_ctl;

- BUG_ON(priv == NULL);
ldev = priv->ldev;
BUG_ON(ldev == NULL);

--
2.20.1
\
 
 \ /
  Last update: 2019-12-17 23:59    [W:0.029 / U:12.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site