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/zero.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/zero.c')
-rw-r--r-- | drivers/usb/gadget/zero.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index a2e6e3fc8c8d..fcfe869acb94 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -653,7 +653,8 @@ set_source_sink_config (struct zero_dev *dev, gfp_t gfp_flags) | |||
653 | result = usb_ep_enable (ep, d); | 653 | result = usb_ep_enable (ep, d); |
654 | if (result == 0) { | 654 | if (result == 0) { |
655 | ep->driver_data = dev; | 655 | ep->driver_data = dev; |
656 | if (source_sink_start_ep (ep, gfp_flags) != 0) { | 656 | if (source_sink_start_ep(ep, gfp_flags) |
657 | != NULL) { | ||
657 | dev->in_ep = ep; | 658 | dev->in_ep = ep; |
658 | continue; | 659 | continue; |
659 | } | 660 | } |
@@ -667,7 +668,8 @@ set_source_sink_config (struct zero_dev *dev, gfp_t gfp_flags) | |||
667 | result = usb_ep_enable (ep, d); | 668 | result = usb_ep_enable (ep, d); |
668 | if (result == 0) { | 669 | if (result == 0) { |
669 | ep->driver_data = dev; | 670 | ep->driver_data = dev; |
670 | if (source_sink_start_ep (ep, gfp_flags) != 0) { | 671 | if (source_sink_start_ep(ep, gfp_flags) |
672 | != NULL) { | ||
671 | dev->out_ep = ep; | 673 | dev->out_ep = ep; |
672 | continue; | 674 | continue; |
673 | } | 675 | } |