[PATCH] Signdness issue in drivers/usb/gadget/ether.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

another gcc 4.1 signdness warning:

drivers/usb/gadget/ether.c:2028: warning: comparison of unsigned expression < 0 is always false

length is assigned the value of usb_ep_queue() which returns an int. Directly
after this it is checked for < 0, which can never be true. Making length an
int makes the error check work again.

Signed-off-by: Eric Sesterhenn <[email protected]>

--- linux-2.6.18-rc4/drivers/usb/gadget/ether.c.orig	2006-08-20 20:40:20.000000000 +0200
+++ linux-2.6.18-rc4/drivers/usb/gadget/ether.c	2006-08-20 20:40:37.000000000 +0200
@@ -1998,7 +1998,7 @@ rndis_control_ack_complete (struct usb_e
 static int rndis_control_ack (struct net_device *net)
 {
 	struct eth_dev          *dev = netdev_priv(net);
-	u32                     length;
+	int                     length;
 	struct usb_request      *resp = dev->stat_req;
 
 	/* in case RNDIS calls this after disconnect */


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux