greybus: es1: remove useless statement
authorRui Miguel Silva <rmfrfs@gmail.com>
Tue, 20 Jan 2015 16:31:45 +0000 (16:31 +0000)
committerGreg Kroah-Hartman <greg@kroah.com>
Wed, 21 Jan 2015 01:45:59 +0000 (09:45 +0800)
just return the result of usb_alloc_urb up, no need to rededunt check for NULL

Signed-off-by: Rui Miguel Silva <rmfrfs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/gb-es1.c

index 27416e440ede5b07d4c0bff74bf05c5441c45235..f44c26d21a209ce62dd287c48b2ebc62ead952af 100644 (file)
@@ -180,8 +180,6 @@ static struct urb *next_free_urb(struct es1_ap_dev *es1, gfp_t gfp_mask)
        dev_err(&es1->usb_dev->dev,
                "No free CPort OUT urbs, having to dynamically allocate one!\n");
        urb = usb_alloc_urb(0, gfp_mask);
-       if (!urb)
-               return NULL;
 
        return urb;
 }