Skip to content

Commit 3f87c42

Browse files
author
Antonio Quartulli
committed
batman-adv: remove useless NULL check
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>
1 parent 46d160e commit 3f87c42

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

‎net/batman-adv/debugfs.c‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,10 +396,8 @@ void batadv_debugfs_init(void)
396396

397397
void batadv_debugfs_destroy(void)
398398
{
399-
if (batadv_debugfs) {
400-
debugfs_remove_recursive(batadv_debugfs);
401-
batadv_debugfs = NULL;
402-
}
399+
debugfs_remove_recursive(batadv_debugfs);
400+
batadv_debugfs = NULL;
403401
}
404402

405403
int batadv_debugfs_add_meshif(struct net_device *dev)

0 commit comments

Comments
 (0)