diff options
author | David Brownell <david-b@pacbell.net> | 2007-07-30 15:31:07 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-07-30 16:27:47 -0400 |
commit | a9475226977917afd5a85621f8a3d7f380a9da31 (patch) | |
tree | d153161062da7286eb4e83e325d5a1f75f3a5cb8 /drivers/usb/gadget/ether.c | |
parent | bc71e479cdb2caab9b4473f7ad508c3fcb142486 (diff) |
USB: "sparse" cleanups for usb gadgets
This removes complaints about the gadget stack which are generated by
the currrent "sparse": it doesn't like the fact that zero is the null
pointer. (Last I checked, C guarantees that's correct ...)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/ether.c')
-rw-r--r-- | drivers/usb/gadget/ether.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c index a3376739a81b..593e23507b1a 100644 --- a/drivers/usb/gadget/ether.c +++ b/drivers/usb/gadget/ether.c | |||
@@ -1723,7 +1723,8 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags) | |||
1723 | size += sizeof (struct rndis_packet_msg_type); | 1723 | size += sizeof (struct rndis_packet_msg_type); |
1724 | size -= size % dev->out_ep->maxpacket; | 1724 | size -= size % dev->out_ep->maxpacket; |
1725 | 1725 | ||
1726 | if ((skb = alloc_skb (size + NET_IP_ALIGN, gfp_flags)) == 0) { | 1726 | skb = alloc_skb(size + NET_IP_ALIGN, gfp_flags); |
1727 | if (skb == NULL) { | ||
1727 | DEBUG (dev, "no rx skb\n"); | 1728 | DEBUG (dev, "no rx skb\n"); |
1728 | goto enomem; | 1729 | goto enomem; |
1729 | } | 1730 | } |