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]
Date:	Fri, 17 Nov 2006 17:49:22 +0100
From:	Mariusz Kozlowski <m.kozlowski@...land.pl>
To:	Lonnie Mendez <dignome@...il.com>,
	Neil Whelchel <koyama@...stlight.net>
Cc:	Greg KH <greg@...ah.com>, linux-usb-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: [PATCH] usb: cypress_m8 init error path fix

Hello,

	If at some point cypress_init() fails deregister
only the resources that were registered until that point.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@...land.pl>

 drivers/usb/serial/cypress_m8.c |    9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

--- linux-2.6.19-rc5-mm2-a/drivers/usb/serial/cypress_m8.c	2006-11-15 11:24:24.000000000 +0100
+++ linux-2.6.19-rc5-mm2-b/drivers/usb/serial/cypress_m8.c	2006-11-17 17:40:21.000000000 +0100
@@ -1684,15 +1684,14 @@ static int __init cypress_init(void)

 	info(DRIVER_DESC " " DRIVER_VERSION);
 	return 0;
+
 failed_usb_register:
-	usb_deregister(&cypress_driver);
-failed_ca42v2_register:
 	usb_serial_deregister(&cypress_ca42v2_device);
-failed_hidcom_register:
+failed_ca42v2_register:
 	usb_serial_deregister(&cypress_hidcom_device);
-failed_em_register:
+failed_hidcom_register:
 	usb_serial_deregister(&cypress_earthmate_device);
-
+failed_em_register:
 	return retval;
 }


-- 
Regards,

	Mariusz Kozlowski
-
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