virtio_console: remove pointless check for debugfs_create_dir()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Feb 2021 15:04:10 +0000 (16:04 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Mar 2021 08:21:02 +0000 (09:21 +0100)
commitfb11de92ac6e4af0b22a79b93602b175603cd30a
tree90acece15a7b79e6e1416426e17ca3fd511a396d
parenta38fd8748464831584a19438cbb3082b5a2dab15
virtio_console: remove pointless check for debugfs_create_dir()

It is impossible for debugfs_create_dir() to return NULL, so checking
for it gives people a false sense that they actually are doing something
if an error occurs.  As there is no need to ever change kernel logic if
debugfs is working "properly" or not, there is no need to check the
return value of debugfs calls, so remove the checks here as they will
never be triggered and are wrong.

Cc: Amit Shah <amit@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: virtualization@lists.linux-foundation.org
Cc: linux-kernel@vger.kernel.org
Reviewed-by: Amit Shah <amit@kernel.org>
Link: https://lore.kernel.org/r/20210216150410.3844635-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/virtio_console.c