lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180812180656.26079-1-thomas.m.a.todd@gmail.com>
Date:   Sun, 12 Aug 2018 19:06:56 +0100
From:   Tom Todd <thomas.m.a.todd@...il.com>
To:     gregkh@...uxfoundation.org
Cc:     stern@...land.harvard.edu, dan.carpenter@...cle.com,
        arvind.yadav.cs@...il.com, thomas.m.a.todd@...il.com,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] USB: core: devio: fixed a trailing statement code style issue

Fixed a code styling issue

Signed-off-by: Tom Todd <thomas.m.a.todd@...il.com>
---
 drivers/usb/core/devio.c | 57 ++++++++++++++++++++--------------------
 1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 476dcc5f2da3..118a29349b1d 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -2139,38 +2139,39 @@ static int proc_ioctl(struct usb_dev_state *ps, struct usbdevfs_ioctl *ctl)
 		retval = -EHOSTUNREACH;
 	else if (!(intf = usb_ifnum_to_if(ps->dev, ctl->ifno)))
 		retval = -EINVAL;
-	else switch (ctl->ioctl_code) {
-
-	/* disconnect kernel driver from interface */
-	case USBDEVFS_DISCONNECT:
-		if (intf->dev.driver) {
-			driver = to_usb_driver(intf->dev.driver);
-			dev_dbg(&intf->dev, "disconnect by usbfs\n");
-			usb_driver_release_interface(driver, intf);
-		} else
-			retval = -ENODATA;
-		break;
+	else
+		switch (ctl->ioctl_code) {
+
+		/* disconnect kernel driver from interface */
+		case USBDEVFS_DISCONNECT:
+			if (intf->dev.driver) {
+				driver = to_usb_driver(intf->dev.driver);
+				dev_dbg(&intf->dev, "disconnect by usbfs\n");
+				usb_driver_release_interface(driver, intf);
+			} else
+				retval = -ENODATA;
+			break;
 
-	/* let kernel drivers try to (re)bind to the interface */
-	case USBDEVFS_CONNECT:
-		if (!intf->dev.driver)
-			retval = device_attach(&intf->dev);
-		else
-			retval = -EBUSY;
-		break;
+		/* let kernel drivers try to (re)bind to the interface */
+		case USBDEVFS_CONNECT:
+			if (!intf->dev.driver)
+				retval = device_attach(&intf->dev);
+			else
+				retval = -EBUSY;
+			break;
 
-	/* talk directly to the interface's driver */
-	default:
-		if (intf->dev.driver)
-			driver = to_usb_driver(intf->dev.driver);
-		if (driver == NULL || driver->unlocked_ioctl == NULL) {
-			retval = -ENOTTY;
-		} else {
-			retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
-			if (retval == -ENOIOCTLCMD)
+		/* talk directly to the interface's driver */
+		default:
+			if (intf->dev.driver)
+				driver = to_usb_driver(intf->dev.driver);
+			if (driver == NULL || driver->unlocked_ioctl == NULL) {
 				retval = -ENOTTY;
+			} else {
+				retval = driver->unlocked_ioctl(intf, ctl->ioctl_code, buf);
+				if (retval == -ENOIOCTLCMD)
+					retval = -ENOTTY;
+			}
 		}
-	}
 
 	/* cleanup and return */
 	if (retval >= 0
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ