Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1543799
| From | Sudip Mukherjee <sudipm.mukherjee@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] usb: atm: cxacru: remove impossible condition |
| Date | 2016-12-16 23:20 +0100 |
| Message-ID | <sP918-11E-23@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
The variable index is unsigned and so it can never be less than 0. Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> --- drivers/usb/atm/cxacru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/atm/cxacru.c b/drivers/usb/atm/cxacru.c index f9fe86b6..d65a64c 100644 --- 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; -- 1.9.1
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH] usb: atm: cxacru: remove impossible condition Sudip Mukherjee <sudipm.mukherjee@gmail.com> - 2016-12-16 23:20 +0100
csiph-web