diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-04-30 11:33:00 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-05-10 16:01:11 +0200 |
commit | 71f46340738322246285a40e25c1c3457a7d986b (patch) | |
tree | 07acc47d0023c1a4432ab3bd8131ce6ab46d64c8 /drivers/usb/host/ohci-hcd.c | |
parent | d0d6bc89b6da035610ee5087593c1fdb35349249 (diff) | |
download | linux-71f46340738322246285a40e25c1c3457a7d986b.tar.gz linux-71f46340738322246285a40e25c1c3457a7d986b.tar.bz2 linux-71f46340738322246285a40e25c1c3457a7d986b.zip |
USB: ohci-hcd.c: move assignment out of if () block
We should not be doing assignments within an if () block
so fix up the code to not do this.
change was created using Coccinelle.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host/ohci-hcd.c')
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index 1dab9dfbca6a..760cb57e954e 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -155,7 +155,8 @@ static int ohci_urb_enqueue ( int retval = 0; /* every endpoint has a ed, locate and maybe (re)initialize it */ - if (! (ed = ed_get (ohci, urb->ep, urb->dev, pipe, urb->interval))) + ed = ed_get(ohci, urb->ep, urb->dev, pipe, urb->interval); + if (! ed) return -ENOMEM; /* for the private part of the URB we need the number of TDs (size) */ |