Fabian Frederick
2014-Jun-29 08:41 UTC
[PATCH 1/1] 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: Amit Shah <amit.shah at redhat.com> Cc: Arnd Bergmann <arnd at arndb.de> Cc: virtualization at lists.linux-foundation.org Signed-off-by: Fabian Frederick <fabf at skynet.be> --- drivers/char/virtio_console.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 60aafb8..b585b47 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); -- 1.8.4.5
Amit Shah
2014-Jun-30 06:46 UTC
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
On (Sun) 29 Jun 2014 [10:41:33], Fabian Frederick wrote:> Fix checkpatch warning: > WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required > > Cc: Amit Shah <amit.shah at redhat.com> > Cc: Arnd Bergmann <arnd at arndb.de> > Cc: virtualization at lists.linux-foundation.org > Signed-off-by: Fabian Frederick <fabf at skynet.be>Reviewed-by: Amit Shah <amit.shah at redhat.com> Rusty, can you pick this up please? Thanks, Amit
Rusty Russell
2014-Jul-09 00:23 UTC
[PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
Amit Shah <amit.shah at redhat.com> writes:> On (Sun) 29 Jun 2014 [10:41:33], Fabian Frederick wrote: >> Fix checkpatch warning: >> WARNING: debugfs_remove_recursive(NULL) is safe this check is probably not required >> >> Cc: Amit Shah <amit.shah at redhat.com> >> Cc: Arnd Bergmann <arnd at arndb.de> >> Cc: virtualization at lists.linux-foundation.org >> Signed-off-by: Fabian Frederick <fabf at skynet.be> > > Reviewed-by: Amit Shah <amit.shah at redhat.com> > > Rusty, can you pick this up please?Applied. Thanks, Rusty.
Possibly Parallel Threads
- [PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
- [PATCH 1/1] virtio: console: remove unnecessary null test before debugfs_remove_recursive
- [PATCHv3] virtio_console: Add support for remoteproc serial
- [PATCHv3] virtio_console: Add support for remoteproc serial
- [PATCH] virtio_console: correct error message on failure of debugfs_create_dir