Commit ad303db6 authored by Felipe Balbi's avatar Felipe Balbi

usb: gadget: net2280: fix sparse warnings

fix the following sparse warnings:

drivers/usb/gadget/net2280.c:2063:13: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2321:68: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2349:68: warning: Using plain integer as NULL pointer
drivers/usb/gadget/net2280.c:2371:68: warning: Using plain integer as NULL pointer
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 69147121
...@@ -2060,7 +2060,7 @@ static void handle_ep_small (struct net2280_ep *ep) ...@@ -2060,7 +2060,7 @@ static void handle_ep_small (struct net2280_ep *ep)
return; return;
/* manual DMA queue advance after short OUT */ /* manual DMA queue advance after short OUT */
if (likely (ep->dma != 0)) { if (likely (ep->dma)) {
if (t & (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT)) { if (t & (1 << SHORT_PACKET_TRANSFERRED_INTERRUPT)) {
u32 count; u32 count;
int stopped = ep->stopped; int stopped = ep->stopped;
...@@ -2318,7 +2318,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat) ...@@ -2318,7 +2318,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
/* hw handles device and interface status */ /* hw handles device and interface status */
if (u.r.bRequestType != (USB_DIR_IN|USB_RECIP_ENDPOINT)) if (u.r.bRequestType != (USB_DIR_IN|USB_RECIP_ENDPOINT))
goto delegate; goto delegate;
if ((e = get_ep_by_addr (dev, w_index)) == 0 if ((e = get_ep_by_addr (dev, w_index)) == NULL
|| w_length > 2) || w_length > 2)
goto do_stall; goto do_stall;
...@@ -2346,7 +2346,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat) ...@@ -2346,7 +2346,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
if (w_value != USB_ENDPOINT_HALT if (w_value != USB_ENDPOINT_HALT
|| w_length != 0) || w_length != 0)
goto do_stall; goto do_stall;
if ((e = get_ep_by_addr (dev, w_index)) == 0) if ((e = get_ep_by_addr (dev, w_index)) == NULL)
goto do_stall; goto do_stall;
if (e->wedged) { if (e->wedged) {
VDEBUG(dev, "%s wedged, halt not cleared\n", VDEBUG(dev, "%s wedged, halt not cleared\n",
...@@ -2368,7 +2368,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat) ...@@ -2368,7 +2368,7 @@ static void handle_stat0_irqs (struct net2280 *dev, u32 stat)
if (w_value != USB_ENDPOINT_HALT if (w_value != USB_ENDPOINT_HALT
|| w_length != 0) || w_length != 0)
goto do_stall; goto do_stall;
if ((e = get_ep_by_addr (dev, w_index)) == 0) if ((e = get_ep_by_addr (dev, w_index)) == NULL)
goto do_stall; goto do_stall;
if (e->ep.name == ep0name) if (e->ep.name == ep0name)
goto do_stall; goto do_stall;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment