Skip to content
Commit 9620a78f authored by Osama Muhammad's avatar Osama Muhammad Committed by Jiri Kosina
Browse files

HID: hid-wiimote-debug.c: Drop error checking for debugfs_create_file

This patch removes the error checking for debugfs_create_file
in hid-wiimote-debug.c.c. This is because the debugfs_create_file()
does not return NULL but an ERR_PTR after an error.
The DebugFS kernel API is developed in a way that the
caller can safely ignore the errors that occur during
the creation of DebugFS nodes.The debugfs Api handles
it gracefully. The check is unnecessary.

Link to the comment above debugfs_create_file:
https://elixir.bootlin.com/linux/latest/source/fs/debugfs/inode.c#L451



Signed-off-by: default avatarOsama Muhammad <osmtendev@gmail.com>
Reviewed-by: default avatarDavid Rheinsberg <david@readahead.eu>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 1d754604
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment