]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: gadget: s3c2410_udc: Move assignment outside if condition
authorSachin Kamat <sachin.kamat@linaro.org>
Wed, 22 Aug 2012 10:19:01 +0000 (15:49 +0530)
committerFelipe Balbi <balbi@ti.com>
Fri, 31 Aug 2012 09:41:55 +0000 (12:41 +0300)
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>
drivers/usb/gadget/s3c2410_udc.c

index d9e3a21b3ddca8090bde60acfcfc0aafb0c03e2d..e895ea12b67eaa87610d189d6a3b391d66cd12e5 100644 (file)
@@ -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;
        }