Skip to content

Commit

Permalink
batman-adv: remove useless NULL check
Browse files Browse the repository at this point in the history
debugfs_remove_recursive() checks whether its argument is not null
on its own, therefore it is possible to remove the external check.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
  • Loading branch information
Antonio Quartulli committed Jan 12, 2013
1 parent 46d160e commit 3f87c42
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions net/batman-adv/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,10 +396,8 @@ void batadv_debugfs_init(void)

void batadv_debugfs_destroy(void)
{
if (batadv_debugfs) {
debugfs_remove_recursive(batadv_debugfs);
batadv_debugfs = NULL;
}
debugfs_remove_recursive(batadv_debugfs);
batadv_debugfs = NULL;
}

int batadv_debugfs_add_meshif(struct net_device *dev)
Expand Down

0 comments on commit 3f87c42

Please sign in to comment.