linux/drivers/base/firmware_loader
Florian Fainelli 495ff36388 firmware_loader: Strip off \n from customized path
Having helped an user recently figure out why the customized path being
specified was not taken into account landed on a subtle difference
between using:

echo "/xyz/firmware" > /sys/module/firmware_class/parameters/path

which inserts an additional newline which is passed as is down to
fw_get_filesystem_firmware() and ultimately kernel_read_file_from_path()
and fails.

Strip off \n from the customized firmware path such that users do not
run into these hard to debug situations.

Link: https://lore.kernel.org/all/20230402135423.3235-1-f.fainelli@gmail.com/
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230413191757.1949088-1-f.fainelli@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-20 11:42:27 +02:00
..
builtin kbuild: do not quote string values in include/config/auto.conf 2022-01-08 18:03:57 +09:00
fallback_platform.c firmware: Store opt_flags in fw_priv 2020-10-05 13:37:04 +02:00
fallback_table.c firmware_loader: move firmware sysctl to its own files 2022-01-22 08:33:35 +02:00
fallback.c firmware_loader: Split sysfs support from fallback 2022-04-26 12:34:09 +02:00
fallback.h firmware_loader: Split sysfs support from fallback 2022-04-26 12:34:09 +02:00
firmware.h firmware_loader: remove #include <generated/utsrelease.h> 2022-12-10 10:33:20 +09:00
Kconfig firmware_loader: Add debug message with checksum for FW file 2023-03-29 12:22:35 +02:00
main.c firmware_loader: Strip off \n from customized path 2023-04-20 11:42:27 +02:00
Makefile firmware_loader: Add firmware-upload support 2022-04-26 12:34:28 +02:00
sysfs_upload.c firmware_loader: Fix memory leak in firmware upload 2022-09-01 17:47:27 +02:00
sysfs_upload.h firmware_loader: Move definitions from sysfs_upload.h to sysfs.h 2022-04-29 16:49:44 +02:00
sysfs.c driver core: class: mark the struct class for sysfs callbacks as constant 2023-03-29 07:54:58 +02:00
sysfs.h firmware_loader: fix up to_fw_sysfs() to preserve const 2022-12-06 16:55:25 +01:00