summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-07-27 07:30:01 +0930
committerRusty Russell <rusty@rustcorp.com.au>2014-07-27 21:07:14 +0930
commit5885e48e4412e75be5495fe889cec6762b165197 (patch)
tree87dec5854c05fa21f780f0eec16b1138ed36fdfc /drivers/char
parent15ba2236f3556fc01b9ca91394465152b5ea74b6 (diff)
downloadlinux-5885e48e4412e75be5495fe889cec6762b165197.tar.bz2
virtio: console: remove unnecessary null test before debugfs_remove_recursive
Fix checkpatch warning: WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required Cc: Arnd Bergmann <arnd@arndb.de> Cc: virtualization@lists.linux-foundation.org Reviewed-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 60aafb8a1f2e..b585b4789822 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -2262,8 +2262,7 @@ static int __init init(void)
unregister:
unregister_virtio_driver(&virtio_console);
free:
- if (pdrvdata.debugfs_dir)
- debugfs_remove_recursive(pdrvdata.debugfs_dir);
+ debugfs_remove_recursive(pdrvdata.debugfs_dir);
class_destroy(pdrvdata.class);
return err;
}
@@ -2276,8 +2275,7 @@ static void __exit fini(void)
unregister_virtio_driver(&virtio_rproc_serial);
class_destroy(pdrvdata.class);
- if (pdrvdata.debugfs_dir)
- debugfs_remove_recursive(pdrvdata.debugfs_dir);
+ debugfs_remove_recursive(pdrvdata.debugfs_dir);
}
module_init(init);
module_exit(fini);