aboutsummaryrefslogtreecommitdiff
path: root/drivers/fpga/fpga-mgr.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <[email protected]>2022-09-01 18:37:34 +0200
committerGreg Kroah-Hartman <[email protected]>2022-09-05 13:01:34 +0200
commit5666a274a6d54372d6b79b1f78682a9d827e679e (patch)
tree7ce89c420972c5129c79d6d20d2c4038076c6ae9 /drivers/fpga/fpga-mgr.c
parentc749b275056d4d1023af125b320c91a24d6856b8 (diff)
driver core: fix driver_set_override() issue with empty strings
Python likes to send an empty string for some sysfs files, including the driver_override field. When commit 23d99baf9d72 ("PCI: Use driver_set_override() instead of open-coding") moved the PCI core to use the driver core function instead of hand-rolling their own handler, this showed up as a regression from some userspace tools, like DPDK. Fix this up by actually looking at the length of the string first instead of trusting that userspace got it correct. Fixes: 23d99baf9d72 ("PCI: Use driver_set_override() instead of open-coding") Cc: Krzysztof Kozlowski <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: "Rafael J. Wysocki" <[email protected]> Cc: Andy Shevchenko <[email protected]> Cc: stable <[email protected]> Reported-by: Stephen Hemminger <[email protected]> Tested-by: Huisong Li <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/fpga/fpga-mgr.c')
0 files changed, 0 insertions, 0 deletions