From: Greg Kroah-Hartman Date: Tue, 22 Jan 2019 14:57:39 +0000 (+0100) Subject: mips: ralink: no need to check return value of debugfs_create functions X-Git-Tag: v5.1-rc1~171^2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4c90de4dd33d90a3d98dd7bc510cd7ed688634be;p=thirdparty%2Fkernel%2Flinux.git mips: ralink: no need to check return value of debugfs_create functions When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: John Crispin Cc: Ralf Baechle Cc: Paul Burton Cc: James Hogan Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman Signed-off-by: Paul Burton --- diff --git a/arch/mips/ralink/bootrom.c b/arch/mips/ralink/bootrom.c index e1fa5972a81db..648f5eb2ba68e 100644 --- a/arch/mips/ralink/bootrom.c +++ b/arch/mips/ralink/bootrom.c @@ -35,13 +35,7 @@ static const struct file_operations bootrom_file_ops = { static int bootrom_setup(void) { - if (!debugfs_create_file("bootrom", 0444, - NULL, NULL, &bootrom_file_ops)) { - pr_err("Failed to create bootrom debugfs file\n"); - - return -EINVAL; - } - + debugfs_create_file("bootrom", 0444, NULL, NULL, &bootrom_file_ops); return 0; }