Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Driver core: make bus_find_device_by_name() more robust

Use sysfs_streq() in bus_find_device_by_name() so trailing newlines
are ignored (E.G. in bind/unbind).

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Peter Korsgaard and committed by
Greg Kroah-Hartman
3ce24d8d 5172046d

+1 -3
+1 -3
drivers/base/bus.c
··· 333 333 { 334 334 const char *name = data; 335 335 336 - if (strcmp(name, dev->bus_id) == 0) 337 - return 1; 338 - return 0; 336 + return sysfs_streq(name, dev->bus_id); 339 337 } 340 338 341 339 /**