summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-08-22 14:19:01 +0400
committerFelipe Balbi <balbi@ti.com>2012-08-31 13:41:55 +0400
commit1660c8944652aac142e622d276c3750f735a568f (patch)
tree653992abb8932b627df79d6c9f1b3b1e55726dce /drivers
parentff24166c3996a343f3901a47bd5fef6181ac21f9 (diff)
downloadlinux-1660c8944652aac142e622d276c3750f735a568f.tar.xz
usb: gadget: s3c2410_udc: Move assignment outside if condition
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/s3c2410_udc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index d9e3a21b3ddc..e895ea12b67e 100644
--- a/drivers/usb/gadget/s3c2410_udc.c
+++ b/drivers/usb/gadget/s3c2410_udc.c
@@ -1696,7 +1696,8 @@ 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;
}
@@ -1704,7 +1705,8 @@ static int s3c2410_udc_start(struct usb_gadget_driver *driver,
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;
}