]> git.ipfire.org Git - thirdparty/linux.git/commit
fix tt_command_write()
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 2 Jul 2025 21:25:42 +0000 (22:25 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2025 11:30:29 +0000 (13:30 +0200)
commit00bbe512e60f681aef132f0dd2c92eb6521acef1
tree5a04cb5b3fd42cec1591a3ffbebb5df274cc41ba
parentd9bc88aa54d6aa22ff1e850a86be7a37f0503889
fix tt_command_write()

1) unbalanced debugfs_file_get().  Not needed in the first place -
file_operations are accessed only via debugfs_create_file(), so
debugfs wrappers will take care of that itself.

2) kmalloc() for a buffer used only for duration of a function is not
a problem, but for a buffer no longer than 16 bytes?

3) strstr() is for finding substrings; for finding a character there's
strchr().

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20250702212542.GH3406663@ZenIV
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thermal/testing/command.c