[PATCH] staging: tidspbridge: rmgr: node.c: Fix for possible null pointer dereference

Rickard Strandqvist rickard_strandqvist at spectrumdigital.se
Sun May 18 15:56:10 UTC 2014


Removde unnecessary check for null pointer.

Was largely found by using a static code analysis program called cppcheck.

Signed-off-by: Rickard Strandqvist <rickard_strandqvist at spectrumdigital.se>
---
 drivers/staging/tidspbridge/rmgr/node.c |    2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/staging/tidspbridge/rmgr/node.c b/drivers/staging/tidspbridge/rmgr/node.c
index 9d3044a..d918f7f 100644
--- a/drivers/staging/tidspbridge/rmgr/node.c
+++ b/drivers/staging/tidspbridge/rmgr/node.c
@@ -2365,8 +2365,6 @@ static void delete_node(struct node_object *hnode,
 	    (struct proc_object *)hnode->processor;
 #endif
 	int status;
-	if (!hnode)
-		goto func_end;
 	hnode_mgr = hnode->node_mgr;
 	if (!hnode_mgr)
 		goto func_end;
-- 
1.7.10.4



More information about the devel mailing list