summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/inode.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2007-07-30 23:31:07 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-31 00:27:47 +0400
commita9475226977917afd5a85621f8a3d7f380a9da31 (patch)
treed153161062da7286eb4e83e325d5a1f75f3a5cb8 /drivers/usb/gadget/inode.c
parentbc71e479cdb2caab9b4473f7ad508c3fcb142486 (diff)
downloadlinux-a9475226977917afd5a85621f8a3d7f380a9da31.tar.xz
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/inode.c')
-rw-r--r--drivers/usb/gadget/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/inode.c b/drivers/usb/gadget/inode.c
index e60745ffaf8e..173004f60fea 100644
--- a/drivers/usb/gadget/inode.c
+++ b/drivers/usb/gadget/inode.c
@@ -964,7 +964,7 @@ static int setup_req (struct usb_ep *ep, struct usb_request *req, u16 len)
}
if (len > sizeof (dev->rbuf))
req->buf = kmalloc(len, GFP_ATOMIC);
- if (req->buf == 0) {
+ if (req->buf == NULL) {
req->buf = dev->rbuf;
return -ENOMEM;
}
@@ -1394,7 +1394,7 @@ gadgetfs_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
dev->setup_abort = 0;
if (dev->state == STATE_DEV_UNCONNECTED) {
#ifdef CONFIG_USB_GADGET_DUALSPEED
- if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == 0) {
+ if (gadget->speed == USB_SPEED_HIGH && dev->hs_config == NULL) {
spin_unlock(&dev->lock);
ERROR (dev, "no high speed config??\n");
return -EINVAL;