diff --git a/os_dep/linux/rtw_proc.c b/os_dep/linux/rtw_proc.c index 1507969..853f880 100644 --- a/os_dep/linux/rtw_proc.c +++ b/os_dep/linux/rtw_proc.c @@ -6094,6 +6094,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer char tmp[32]; u32 en, rf_path; + int num; // Move declaration to the top if (!padapter) return -EFAULT; @@ -6109,7 +6110,7 @@ static ssize_t proc_set_single_tone(struct file *file, const char __user *buffer } if (buffer && !copy_from_user(tmp, buffer, count)) { - int num = sscanf(tmp, "%u %u", &en, &rf_path); + num = sscanf(tmp, "%u %u", &en, &rf_path); // Now, `num` is already declared if (num < 1) return count; }