Skip to content

Commit 233637f

Browse files
KhanhNguyen-RVCcfriedt
authored andcommitted
drivers: video: shell: fix control name lookup
video_shell_get_ctrl_by_name() normalized the search string (`name`) instead of the control's actual name (`cq->name`). This made the comparison always succeed on the first control, causing incorrect lookups at runtime. Update the code to normalize `cq->name` before comparison so that each control name is correctly checked against the search string. Signed-off-by: Khanh Nguyen <[email protected]>
1 parent cc32112 commit 233637f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/video_shell.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ static int video_shell_get_ctrl_by_name(struct video_ctrl_query *cq, char const
651651
return -ENOENT;
652652
}
653653

654-
video_shell_convert_ctrl_name(name, ctrl_name, sizeof(ctrl_name));
654+
video_shell_convert_ctrl_name(cq->name, ctrl_name, sizeof(ctrl_name));
655655
if (strcmp(ctrl_name, name) == 0) {
656656
break;
657657
}

0 commit comments

Comments
 (0)