Skip to content

Commit 4c90de4

Browse files
gregkhpaulburton
authored andcommitted
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 <john@phrozen.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Paul Burton <paul.burton@mips.com> Cc: James Hogan <jhogan@kernel.org> Cc: linux-mips@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Burton <paul.burton@mips.com>
1 parent 9afbb71 commit 4c90de4

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

arch/mips/ralink/bootrom.c

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ static const struct file_operations bootrom_file_ops = {
3535

3636
static int bootrom_setup(void)
3737
{
38-
if (!debugfs_create_file("bootrom", 0444,
39-
NULL, NULL, &bootrom_file_ops)) {
40-
pr_err("Failed to create bootrom debugfs file\n");
41-
42-
return -EINVAL;
43-
}
44-
38+
debugfs_create_file("bootrom", 0444, NULL, NULL, &bootrom_file_ops);
4539
return 0;
4640
}
4741

0 commit comments

Comments
 (0)