Skip to content

Commit

Permalink
usb: gadget: s3c2410_udc: Move assignment outside if condition
Browse files Browse the repository at this point in the history
Fixes the following checkpatch errors:
ERROR: do not use assignment in if condition

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Sachin Kamat authored and Felipe Balbi committed Aug 31, 2012
1 parent ff24166 commit 1660c89
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/usb/gadget/s3c2410_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1696,15 +1696,17 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver,
udc->gadget.dev.driver = &driver->driver;

/* Bind the driver */
if ((retval = device_add(&udc->gadget.dev)) != 0) {
retval = device_add(&udc->gadget.dev);
if (retval) {
dev_err(&udc->gadget.dev, "Error in device_add() : %d\n", retval);
goto register_error;
}

dprintk(DEBUG_NORMAL, "binding gadget driver '%s'\n",
driver->driver.name);

if ((retval = bind(&udc->gadget)) != 0) {
retval = bind(&udc->gadget);
if (retval) {
device_del(&udc->gadget.dev);
goto register_error;
}
Expand Down

0 comments on commit 1660c89

Please sign in to comment.