projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4495c08
)
usb: atm: remove unnecessary code
author
Gustavo A. R. Silva
<
[email protected]
>
Thu, 16 Feb 2017 22:27:36 +0000
(16:27 -0600)
committer
Greg Kroah-Hartman
<
[email protected]
>
Thu, 16 Mar 2017 08:58:44 +0000
(17:58 +0900)
'index' is an unsigned variable, and less-than-zero comparison of an unsigned
variable is never true.
Addresses-Coverity-ID: 115396
Signed-off-by: Gustavo A. R. Silva <
[email protected]
>
Signed-off-by: Greg Kroah-Hartman <
[email protected]
>
drivers/usb/atm/cxacru.c
patch
|
blob
|
history
diff --git
a/drivers/usb/atm/cxacru.c
b/drivers/usb/atm/cxacru.c
index f9fe86b6f7b5b6ac5e35d944500cd74781f6dd26..d65a64c29b852af9ec47f48fe4d3e0024aa66743 100644
(file)
--- a/
drivers/usb/atm/cxacru.c
+++ b/
drivers/usb/atm/cxacru.c
@@
-474,7
+474,7
@@
static ssize_t cxacru_sysfs_store_adsl_config(struct device *dev,
ret = sscanf(buf + pos, "%x=%x%n", &index, &value, &tmp);
if (ret < 2)
return -EINVAL;
- if (index
< 0 || index
> 0x7f)
+ if (index > 0x7f)
return -EINVAL;
if (tmp < 0 || tmp > len - pos)
return -EINVAL;