Diff between 94b0a8f405a591e6b082589e3f06ec9db747af31 and 4ae0fb61c2b92a3070898d8c03472775bea6c76f

Changed Files

File Additions Deletions Status
tools/hid2hci.c +5 -6 modified

Full Patch

diff --git a/tools/hid2hci.c b/tools/hid2hci.c
index dea3974..45a3a3d 100644
--- a/tools/hid2hci.c
+++ b/tools/hid2hci.c
@@ -49,15 +49,14 @@ static int usb_switch_csr(struct usb_dev_handle *dev, enum mode mode)
 	int err;
 
 	err = usb_control_msg(dev,
-			      USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
-			      0, mode, 0, NULL, 0, 10000);
+			USB_ENDPOINT_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE,
+			0, mode, 0, NULL, 0, 10000);
 	if (err == 0) {
 		err = -1;
 		errno = EALREADY;
-	} else {
-		if (errno == ETIMEDOUT)
-			err = 0;
-	}
+	} else if (errno == ETIMEDOUT)
+		err = 0;
+
 	return err;
 }