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:
David Brownell
2007-07-30 12:31:07 -07:00
committed by Greg Kroah-Hartman
parent bc71e479cd
commit a947522697
6 changed files with 11 additions and 8 deletions

View File

@ -653,7 +653,8 @@ set_source_sink_config (struct zero_dev *dev, gfp_t gfp_flags)
result = usb_ep_enable (ep, d);
if (result == 0) {
ep->driver_data = dev;
if (source_sink_start_ep (ep, gfp_flags) != 0) {
if (source_sink_start_ep(ep, gfp_flags)
!= NULL) {
dev->in_ep = ep;
continue;
}
@ -667,7 +668,8 @@ set_source_sink_config (struct zero_dev *dev, gfp_t gfp_flags)
result = usb_ep_enable (ep, d);
if (result == 0) {
ep->driver_data = dev;
if (source_sink_start_ep (ep, gfp_flags) != 0) {
if (source_sink_start_ep(ep, gfp_flags)
!= NULL) {
dev->out_ep = ep;
continue;
}