Skip to content

Commit

Permalink
netlabel: Deletion of an unnecessary check before the function call "…
Browse files Browse the repository at this point in the history
…cipso_v4_doi_free"

The cipso_v4_doi_free() function tests whether its argument is NULL and then
returns immediately. Thus the test around the call is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <[email protected]>
Acked-by: Paul Moore <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
elfring authored and davem330 committed Feb 4, 2015
1 parent 79b7cf6 commit 7a11b1d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netlabel/netlabel_cipso_v4.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,7 @@ static int netlbl_cipsov4_add_std(struct genl_info *info,
return 0;

add_std_failure:
if (doi_def)
cipso_v4_doi_free(doi_def);
cipso_v4_doi_free(doi_def);
return ret_val;
}

Expand Down

0 comments on commit 7a11b1d

Please sign in to comment.