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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
bc71e479cd
commit
a947522697
@@ -1723,7 +1723,8 @@ rx_submit (struct eth_dev *dev, struct usb_request *req, gfp_t gfp_flags)
|
||||
size += sizeof (struct rndis_packet_msg_type);
|
||||
size -= size % dev->out_ep->maxpacket;
|
||||
|
||||
if ((skb = alloc_skb (size + NET_IP_ALIGN, gfp_flags)) == 0) {
|
||||
skb = alloc_skb(size + NET_IP_ALIGN, gfp_flags);
|
||||
if (skb == NULL) {
|
||||
DEBUG (dev, "no rx skb\n");
|
||||
goto enomem;
|
||||
}
|
||||
|
Reference in New Issue
Block a user