mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 14:32:23 +00:00
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>
This commit is contained in:
parent
5172046d96
commit
3ce24d8d93
@ -333,9 +333,7 @@ static int match_name(struct device *dev, void *data)
|
||||
{
|
||||
const char *name = data;
|
||||
|
||||
if (strcmp(name, dev->bus_id) == 0)
|
||||
return 1;
|
||||
return 0;
|
||||
return sysfs_streq(name, dev->bus_id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user