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>] [day] [month] [year] [list]
Message-ID: <201306281729.44988.hartleys@visionengravers.com>
Date:	Fri, 28 Jun 2013 17:29:44 -0700
From:	H Hartley Sweeten <hartleys@...ionengravers.com>
To:	Linux Kernel <linux-kernel@...r.kernel.org>
CC:	<stern@...land.harvard.edu>, <kernel@...tstofly.org>,
	<gregkh@...uxfoundation.org>
Subject: [PATCH 4/4] usb: ohci-ep93xx: tidy up ohci_hcd_ep93xx_drv_probe()

Refactor the function a bit to remove the need for the local variable.

The extern prototype of usb_disabled() is not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Alan Stern <stern@...land.harvard.edu>
Cc: Lennert Buytenhek <kernel@...tstofly.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
 drivers/usb/host/ohci-ep93xx.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/drivers/usb/host/ohci-ep93xx.c b/drivers/usb/host/ohci-ep93xx.c
index 28fa6b8..bdc2908 100644
--- a/drivers/usb/host/ohci-ep93xx.c
+++ b/drivers/usb/host/ohci-ep93xx.c
@@ -138,17 +138,12 @@ static struct hc_driver ohci_ep93xx_hc_driver = {
 	.start_port_reset	= ohci_start_port_reset,
 };
 
-extern int usb_disabled(void);
-
 static int ohci_hcd_ep93xx_drv_probe(struct platform_device *pdev)
 {
-	int ret;
-
-	ret = -ENODEV;
-	if (!usb_disabled())
-		ret = usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev);
+	if (usb_disabled())
+		return -ENODEV;
 
-	return ret;
+	return usb_hcd_ep93xx_probe(&ohci_ep93xx_hc_driver, pdev);
 }
 
 static int ohci_hcd_ep93xx_drv_remove(struct platform_device *pdev)
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ