From 988e7520818c4e9ac6d4b195376a46bb24a0dd99 Mon Sep 17 00:00:00 2001 From: =?utf8?q?M=C3=A1rton=20N=C3=A9meth?= Date: Thu, 26 May 2011 09:24:45 +0200 Subject: [PATCH] usbip: remove check for negative values for an unsigned value MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The parameter rhport is unsigned so there is no need checking for negative values. This will remove the following warning message when compiling with "make W=1 ...": drivers/staging/usbip/vhci_sysfs.c: In function ‘valid_args’: drivers/staging/usbip/vhci_sysfs.c:138: warning: comparison of unsigned expression < 0 is always false Signed-off-by: Márton Németh Signed-off-by: Greg Kroah-Hartman --- drivers/staging/usbip/vhci_sysfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c index d9736f9c4028..7b6e4a90212f 100644 --- a/drivers/staging/usbip/vhci_sysfs.c +++ b/drivers/staging/usbip/vhci_sysfs.c @@ -135,7 +135,7 @@ static DEVICE_ATTR(detach, S_IWUSR, NULL, store_detach); static int valid_args(__u32 rhport, enum usb_device_speed speed) { /* check rhport */ - if ((rhport < 0) || (rhport >= VHCI_NPORTS)) { + if (rhport >= VHCI_NPORTS) { pr_err("port %u\n", rhport); return -EINVAL; } -- 2.20.1