Skip to content

Commit

Permalink
Buffer error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Arafattex authored Jun 2, 2023
1 parent 0535825 commit 6af5519
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/misc/mediatek/base/power/udi_v2/mtk_udi.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,14 +482,14 @@ static ssize_t udi_jtag_clock_proc_write(struct file *file,
/* 6 parameter */
IR_pause_count = recv_buf[3];
DR_pause_count = recv_buf[4];
} else if (sscanf(buf, "%4s %u %u %512s %u %512s",
} else if (sscanf(buf, "%s %u %u %s %u %s",
&recv_key_word[0], &recv_buf[0],
&recv_buf[1], recv_char[0],
&recv_buf[2], recv_char[1]) == 6) {
/* 4 parameter */
IR_pause_count = 0;
DR_pause_count = 0;
} else if (sscanf(buf, "%6s", &recv_key_word[0]) == 1) {
} else if (sscanf(buf, "%s", &recv_key_word[0]) == 1) {
/* RESET */
if (!strcmp(recv_key_word, "RESET")) {
udi_ver("Input data: recv_key_word = RESET\n");
Expand Down Expand Up @@ -778,4 +778,4 @@ module_exit(udi_exit);
MODULE_DESCRIPTION("MediaTek UDI Driver v2");
MODULE_LICENSE("GPL");
#endif /* __KERNEL__ */
#undef __MTK_UDI_C__
#undef __MTK_UDI_C__

0 comments on commit 6af5519

Please sign in to comment.