]> git.baikalelectronics.ru Git - kernel.git/commit
fault-inject: clean up debugfs file creation logic
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 12 Jun 2019 09:58:28 +0000 (11:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Jun 2019 11:47:24 +0000 (13:47 +0200)
commit912caa4289b59673199763d3e3e63d81e6695524
tree40e8117708017d79d93c2093ccef4b0165d8c269
parent88314d656cf87deab691dffb30c088ad16fd93fc
fault-inject: clean up debugfs file creation logic

There is no need to check the return value of a debugfs_create_file
call, a caller should never change what they do depending on if debugfs
is working properly or not, so remove the checks, simplifying the logic
in the file a lot.

Also fix up the error check for debugfs_create_dir() which was not
returning NULL for an error, but rather a error pointer.

Cc: linux-kernel@vger.kernel.org
Reviewed-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
lib/fault-inject.c