Skip to content

Commit

Permalink
USB: fix signedness issue in drivers/usb/gadget/ether.c
Browse files Browse the repository at this point in the history
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 <snakebyte@gmx.de>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Eric Sesterhenn authored and Greg Kroah-Hartman committed Sep 27, 2006
1 parent 095bc33 commit 5535902
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/gadget/ether.c
Original file line number Diff line number Diff line change
Expand Up @@ -2014,7 +2014,7 @@ rndis_control_ack_complete (struct usb_ep *ep, struct usb_request *req)
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 */
Expand Down

0 comments on commit 5535902

Please sign in to comment.