ath9k: drop negativity checks for unsigned values coming from kstrtoul()
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80471 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80481 Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
3ae351abf1
commit
3f5572020c
@@ -202,7 +202,7 @@ static ssize_t write_file_ani(struct file *file,
|
||||
if (kstrtoul(buf, 0, &ani))
|
||||
return -EINVAL;
|
||||
|
||||
if (ani < 0 || ani > 1)
|
||||
if (ani > 1)
|
||||
return -EINVAL;
|
||||
|
||||
common->disable_ani = !ani;
|
||||
|
Reference in New Issue
Block a user