diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-07-26 18:00:01 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2014-07-27 07:37:14 -0400 |
commit | 5885e48e4412e75be5495fe889cec6762b165197 (patch) | |
tree | 87dec5854c05fa21f780f0eec16b1138ed36fdfc /drivers/char/virtio_console.c | |
parent | 15ba2236f3556fc01b9ca91394465152b5ea74b6 (diff) |
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/virtio_console.c')
-rw-r--r-- | drivers/char/virtio_console.c | 6 |
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) | |||
2262 | unregister: | 2262 | unregister: |
2263 | unregister_virtio_driver(&virtio_console); | 2263 | unregister_virtio_driver(&virtio_console); |
2264 | free: | 2264 | free: |
2265 | if (pdrvdata.debugfs_dir) | 2265 | debugfs_remove_recursive(pdrvdata.debugfs_dir); |
2266 | debugfs_remove_recursive(pdrvdata.debugfs_dir); | ||
2267 | class_destroy(pdrvdata.class); | 2266 | class_destroy(pdrvdata.class); |
2268 | return err; | 2267 | return err; |
2269 | } | 2268 | } |
@@ -2276,8 +2275,7 @@ static void __exit fini(void) | |||
2276 | unregister_virtio_driver(&virtio_rproc_serial); | 2275 | unregister_virtio_driver(&virtio_rproc_serial); |
2277 | 2276 | ||
2278 | class_destroy(pdrvdata.class); | 2277 | class_destroy(pdrvdata.class); |
2279 | if (pdrvdata.debugfs_dir) | 2278 | debugfs_remove_recursive(pdrvdata.debugfs_dir); |
2280 | debugfs_remove_recursive(pdrvdata.debugfs_dir); | ||
2281 | } | 2279 | } |
2282 | module_init(init); | 2280 | module_init(init); |
2283 | module_exit(fini); | 2281 | module_exit(fini); |