diff options
author | Armin Wolf <W_Armin@gmx.de> | 2021-12-11 16:54:21 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2021-12-26 15:02:06 -0800 |
commit | 02405387746915b93b283c18780b6cef90394ea1 (patch) | |
tree | fcc05c13861289c47783876d153b2bd2bd20d26a /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9c6d555187f504b880ca506b0b2d0edbdb5d2d5f (diff) |
hwmon: (dell-smm) Simplify ioctl handler
The second switch-case has no real purpose:
- for I8K_BIOS_VERSION, val does not represent a return value,
making the check for error values unnecessary.
- for I8K_MACHINE_ID, val remains zero, so the error check is
unnecessary too.
Remove the switch-case and move the calls to copy_to_user()
into the first switch-case for I8K_BIOS_VERSION/_MACHINE_ID.
Omit buff[] since data->bios_machineid already contains the string
with the necessary zero padding through devm_kzalloc().
Tested on a Dell Inspiron 3505.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20211211155422.16830-2-W_Armin@gmx.de
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions