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>
This commit is contained in:
parent
15ba2236f3
commit
5885e48e44
1 changed files with 2 additions and 4 deletions
|
@ -2262,8 +2262,7 @@ static int __init init(void)
|
||||||
unregister:
|
unregister:
|
||||||
unregister_virtio_driver(&virtio_console);
|
unregister_virtio_driver(&virtio_console);
|
||||||
free:
|
free:
|
||||||
if (pdrvdata.debugfs_dir)
|
debugfs_remove_recursive(pdrvdata.debugfs_dir);
|
||||||
debugfs_remove_recursive(pdrvdata.debugfs_dir);
|
|
||||||
class_destroy(pdrvdata.class);
|
class_destroy(pdrvdata.class);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -2276,8 +2275,7 @@ static void __exit fini(void)
|
||||||
unregister_virtio_driver(&virtio_rproc_serial);
|
unregister_virtio_driver(&virtio_rproc_serial);
|
||||||
|
|
||||||
class_destroy(pdrvdata.class);
|
class_destroy(pdrvdata.class);
|
||||||
if (pdrvdata.debugfs_dir)
|
debugfs_remove_recursive(pdrvdata.debugfs_dir);
|
||||||
debugfs_remove_recursive(pdrvdata.debugfs_dir);
|
|
||||||
}
|
}
|
||||||
module_init(init);
|
module_init(init);
|
||||||
module_exit(fini);
|
module_exit(fini);
|
||||||
|
|
Loading…
Add table
Reference in a new issue