From: Fabian Frederick Date: Sat, 26 Jul 2014 22:00:01 +0000 (+0930) Subject: virtio: console: remove unnecessary null test before debugfs_remove_recursive X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=5885e48e4412e75be5495fe889cec6762b165197;p=linux-beck.git 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 Cc: virtualization@lists.linux-foundation.org Reviewed-by: Amit Shah Signed-off-by: Fabian Frederick Signed-off-by: Rusty Russell --- 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);