mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-03 17:40:04 +00:00
[media] Fix sysfs rc protocol lookup for rc-5-sz
With the current matching rules the lookup for rc protocol named rc-5-sz matches with "rc-5" before finding "rc-5-sz". Thus one is able to never enable/disable the rc-5-sz protocol via sysfs. Fix the lookup to require an exact match which allows the manipulation of sz protocol. Signed-off-by: Antti Seppälä <a.seppala@gmail.com> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
54ebb8b83f
commit
0a91be40ed
1 changed files with 1 additions and 1 deletions
|
@ -844,7 +844,7 @@ static ssize_t store_protocols(struct device *device,
|
||||||
count++;
|
count++;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
|
for (i = 0; i < ARRAY_SIZE(proto_names); i++) {
|
||||||
if (!strncasecmp(tmp, proto_names[i].name, strlen(proto_names[i].name))) {
|
if (!strcasecmp(tmp, proto_names[i].name)) {
|
||||||
tmp += strlen(proto_names[i].name);
|
tmp += strlen(proto_names[i].name);
|
||||||
mask = proto_names[i].type;
|
mask = proto_names[i].type;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue