linux/drivers/usb
Ingo Rohloff ea57f0bbe2 usb: gadget: configfs: Ignore trailing LF for user strings to cdev
commit 9466545720 upstream.

Since commit c033563220
("usb: gadget: configfs: Attach arbitrary strings to cdev")
a user can provide extra string descriptors to a USB gadget via configfs.

For "manufacturer", "product", "serialnumber", setting the string via
configfs ignores a trailing LF.

For the arbitrary strings the LF was not ignored.

This patch ignores a trailing LF to make this consistent with the existing
behavior for "manufacturer", ...  string descriptors.

Fixes: c033563220 ("usb: gadget: configfs: Attach arbitrary strings to cdev")
Cc: stable <stable@kernel.org>
Signed-off-by: Ingo Rohloff <ingo.rohloff@lauterbach.com>
Link: https://lore.kernel.org/r/20241212154114.29295-1-ingo.rohloff@lauterbach.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-01-17 13:36:22 +01:00
..
atm usb: atm: cxacru: fix endpoint checking in cxacru_bind() 2024-07-05 09:33:58 +02:00
c67x00 usb: c67x00-drv: Convert to platform remove callback returning void 2023-05-28 12:36:14 +01:00
cdns3 usb: cdns3: Add quirk flag to enable suspend residency 2024-12-27 13:58:43 +01:00
chipidea usb: chipidea: ci_hdrc_imx: decrement device's refcount in .remove() and in the error path of .probe() 2025-01-17 13:36:22 +01:00
class USB: usblp: return error when setting unsupported protocol 2025-01-17 13:36:21 +01:00
common usb: ulpi: Fix debugfs directory leak 2024-02-23 09:24:56 +01:00
core usb: fix reference leak in usb_new_device() 2025-01-17 13:36:22 +01:00
dwc2 usb: dwc2: gadget: Don't write invalid mapped sg entries into dma_desc with iommu enabled 2024-12-27 13:58:41 +01:00
dwc3 usb: dwc3-am62: Disable autosuspend during remove 2025-01-17 13:36:21 +01:00
early usb: early: xhci-dbc: Use memcpy_and_pad() 2023-01-31 10:40:54 +01:00
fotg210 usb: fotg210: Add missing kernel doc description 2024-06-12 11:12:31 +02:00
gadget usb: gadget: configfs: Ignore trailing LF for user strings to cdev 2025-01-17 13:36:22 +01:00
host usb: xhci: Avoid queuing redundant Stop Endpoint commands 2025-01-09 13:31:53 +01:00
image scsi: usb: uas: Declare two host templates and host template pointers const 2023-03-24 19:20:00 -04:00
isp1760 usb: isp1760: Convert to platform remove callback returning void 2023-05-28 12:38:01 +01:00
misc USB: chaoskey: Fix possible deadlock chaoskey_list_lock 2024-12-09 10:32:36 +01:00
mon usb: mon: Fix atomicity violation in mon_bin_vma_fault 2024-01-25 15:35:43 -08:00
mtu3 usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
musb usb: musb: Fix hardware lockup on first Rx endpoint request 2024-12-09 10:32:53 +01:00
phy usb: phy: Fix API devm_usb_put_phy() can not release the phy 2024-11-08 16:28:22 +01:00
renesas_usbhs usb: Explicitly include correct DT includes 2023-07-25 18:20:02 +02:00
roles usb: roles: don't get/set_role() when usb_role_switch is unregistered 2024-03-01 13:35:02 +01:00
serial USB: serial: cp210x: add Phoenix Contact UPS Device 2025-01-17 13:36:20 +01:00
storage usb-storage: Add max sectors quirk for Nokia 208 2025-01-17 13:36:20 +01:00
typec usb: typec: tcpm/tcpci_maxim: fix error code in max_contaminant_read_resistance_kohm() 2025-01-17 13:36:22 +01:00
usbip usbip: Don't submit special requests twice 2024-09-08 07:54:44 +02:00
Kconfig usb: move config USB_USS720 to usb's misc Kconfig 2023-03-29 10:34:08 +02:00
Makefile USB: xen-hcd: Traverse host/ when CONFIG_USB_XEN_HCD is selected 2024-06-21 14:38:23 +02:00
usb-skeleton.c usb: add usb_set_intfdata() documentation 2022-11-29 08:56:09 +01:00