[PATCH 4/5] usb: gadget: s3c2410_udc: Move assignment outside if condition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes the following checkpatch errors:
ERROR: do not use assignment in if condition

Signed-off-by: Sachin Kamat <sachin.kamat@xxxxxxxxxx>
---
 drivers/usb/gadget/s3c2410_udc.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/s3c2410_udc.c b/drivers/usb/gadget/s3c2410_udc.c
index 5ed22d0..921400c 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) {
 		pr_err("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;
 	}
-- 
1.7.4.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux