- net-bluetooth-handle-sysfs-errors.patch removed from -mm tree

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

 



The patch titled

     NET/bluetooth: handle sysfs errors

has been removed from the -mm tree.  Its filename is

     net-bluetooth-handle-sysfs-errors.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: NET/bluetooth: handle sysfs errors
From: Jeff Garzik <jeff@xxxxxxxxxx>

Signed-off-by: Jeff Garzik <jeff@xxxxxxxxxx>
Cc: Marcel Holtmann <marcel@xxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 net/bluetooth/l2cap.c       |   19 ++++++++++++++-----
 net/bluetooth/rfcomm/core.c |   25 ++++++++++++++++++++-----
 net/bluetooth/rfcomm/sock.c |    7 ++++++-
 net/bluetooth/sco.c         |   17 ++++++++++++-----
 4 files changed, 52 insertions(+), 16 deletions(-)

diff -puN net/bluetooth/l2cap.c~net-bluetooth-handle-sysfs-errors net/bluetooth/l2cap.c
--- a/net/bluetooth/l2cap.c~net-bluetooth-handle-sysfs-errors
+++ a/net/bluetooth/l2cap.c
@@ -2206,24 +2206,33 @@ static int __init l2cap_init(void)
 	err = bt_sock_register(BTPROTO_L2CAP, &l2cap_sock_family_ops);
 	if (err < 0) {
 		BT_ERR("L2CAP socket registration failed");
-		goto error;
+		goto err_proto;
 	}
 
 	err = hci_register_proto(&l2cap_hci_proto);
 	if (err < 0) {
 		BT_ERR("L2CAP protocol registration failed");
-		bt_sock_unregister(BTPROTO_L2CAP);
-		goto error;
+		goto err_sock;
 	}
 
-	class_create_file(bt_class, &class_attr_l2cap);
+	err = class_create_file(bt_class, &class_attr_l2cap);
+	if (err) {
+		BT_ERR("L2CAP class registration failed");
+		goto err_proto2;
+	}
 
 	BT_INFO("L2CAP ver %s", VERSION);
 	BT_INFO("L2CAP socket layer initialized");
 
 	return 0;
 
-error:
+err_proto2:
+	if (hci_unregister_proto(&l2cap_hci_proto) < 0)
+		BT_ERR("L2CAP protocol unregistration failed");
+err_sock:
+	if (bt_sock_unregister(BTPROTO_L2CAP) < 0)
+		BT_ERR("L2CAP socket unregistration failed");
+err_proto:
 	proto_unregister(&l2cap_proto);
 	return err;
 }
diff -puN net/bluetooth/rfcomm/core.c~net-bluetooth-handle-sysfs-errors net/bluetooth/rfcomm/core.c
--- a/net/bluetooth/rfcomm/core.c~net-bluetooth-handle-sysfs-errors
+++ a/net/bluetooth/rfcomm/core.c
@@ -2052,13 +2052,21 @@ static CLASS_ATTR(rfcomm_dlc, S_IRUGO, r
 /* ---- Initialization ---- */
 static int __init rfcomm_init(void)
 {
-	l2cap_load();
-
-	hci_register_cb(&rfcomm_cb);
+	int rc;
 
-	kernel_thread(rfcomm_run, NULL, CLONE_KERNEL);
+	l2cap_load();
 
-	class_create_file(bt_class, &class_attr_rfcomm_dlc);
+	rc = hci_register_cb(&rfcomm_cb);
+	if (rc)
+		goto err;
+
+	rc = class_create_file(bt_class, &class_attr_rfcomm_dlc);
+	if (rc)
+		goto err_hcireg;
+
+	rc = kernel_thread(rfcomm_run, NULL, CLONE_KERNEL);
+	if (rc < 0)
+		goto err_file;
 
 	rfcomm_init_sockets();
 
@@ -2069,6 +2077,13 @@ static int __init rfcomm_init(void)
 	BT_INFO("RFCOMM ver %s", VERSION);
 
 	return 0;
+
+err_file:
+	class_remove_file(bt_class, &class_attr_rfcomm_dlc);
+err_hcireg:
+	hci_unregister_cb(&rfcomm_cb);
+err:
+	return rc;
 }
 
 static void __exit rfcomm_exit(void)
diff -puN net/bluetooth/rfcomm/sock.c~net-bluetooth-handle-sysfs-errors net/bluetooth/rfcomm/sock.c
--- a/net/bluetooth/rfcomm/sock.c~net-bluetooth-handle-sysfs-errors
+++ a/net/bluetooth/rfcomm/sock.c
@@ -944,12 +944,17 @@ int __init rfcomm_init_sockets(void)
 	if (err < 0)
 		goto error;
 
-	class_create_file(bt_class, &class_attr_rfcomm);
+	err = class_create_file(bt_class, &class_attr_rfcomm);
+	if (err)
+		goto error_sock;
 
 	BT_INFO("RFCOMM socket layer initialized");
 
 	return 0;
 
+error_sock:
+	if (bt_sock_unregister(BTPROTO_RFCOMM) < 0)
+		BT_ERR("RFCOMM socket layer unregistration failed");
 error:
 	BT_ERR("RFCOMM socket layer registration failed");
 	proto_unregister(&rfcomm_proto);
diff -puN net/bluetooth/sco.c~net-bluetooth-handle-sysfs-errors net/bluetooth/sco.c
--- a/net/bluetooth/sco.c~net-bluetooth-handle-sysfs-errors
+++ a/net/bluetooth/sco.c
@@ -957,24 +957,31 @@ static int __init sco_init(void)
 	err = bt_sock_register(BTPROTO_SCO, &sco_sock_family_ops);
 	if (err < 0) {
 		BT_ERR("SCO socket registration failed");
-		goto error;
+		goto err_proto;
 	}
 
 	err = hci_register_proto(&sco_hci_proto);
 	if (err < 0) {
 		BT_ERR("SCO protocol registration failed");
-		bt_sock_unregister(BTPROTO_SCO);
-		goto error;
+		goto err_sock;
 	}
 
-	class_create_file(bt_class, &class_attr_sco);
+	err = class_create_file(bt_class, &class_attr_sco);
+	if (err)
+		goto err_proto2;
 
 	BT_INFO("SCO (Voice Link) ver %s", VERSION);
 	BT_INFO("SCO socket layer initialized");
 
 	return 0;
 
-error:
+err_proto2:
+	if (hci_unregister_proto(&sco_hci_proto) < 0)
+		BT_ERR("SCO protocol unregistration failed");
+err_sock:
+	if (bt_sock_unregister(BTPROTO_SCO) < 0)
+		BT_ERR("SCO socket unregistration failed");
+err_proto:
 	proto_unregister(&sco_proto);
 	return err;
 }
_

Patches currently in -mm which might be from jeff@xxxxxxxxxx are

origin.patch
i2c-buses-scx200_acb-handle-pci-errors.patch
fix-up-a-multitude-of-acpi-compiler-warnings-on-x86_64.patch
cpufreq-handle-sysfs-errors.patch
drm-fix-error-returns-sysfs-error-handling.patch
git-dvb.patch
git-input.patch
input-handle-sysfs-errors.patch
input-drivers-handle-sysfs-errors.patch
git-libata-all.patch
ata-must-depend-on-block.patch
via-pata-controller-xfer-fixes.patch
ahci-ati-sb600-sata-support-for-various-modes.patch
drivers-mmcmisc-handle-pci-errors-on-resume.patch
git-mtd.patch
git-netdev-all.patch
libphy-dont-do-that.patch
update-smc91x-driver-with-arm-versatile-board-info.patch
8139too-force-media-setting-fix.patch
tulip-fix-shutdown-dma-irq-race.patch
drivers-dma-handle-sysfs-errors.patch
atm-firestream-handle-thrown-error.patch
wan-pc300-handle-propagate-minor-errors.patch
net-atm-handle-sysfs-errors.patch
pcmcia-handle-sysfs-pci-errors.patch
r8169-driver-corega-support-patch.patch
serial-handle-pci_enable_device-failure-upon-resume.patch
git-pciseg.patch
scsi-minor-bug-fixes-and-cleanups.patch
mpt-fusion-handle-pci-layer-error-on-resume.patch
scsi-aha1740-handle-scsi-api-errors.patch
scsi-qla2xxx-handle-sysfs-errors.patch
usb-gadget-net2280-handle-sysfs-errors.patch
git-watchdog.patch
airo-suspend-fix.patch
drivers-led-handle-sysfs-errors.patch
i2o-handle-a-few-sysfs-errors.patch
fs-partitions-check-add-sysfs-error-handling.patch
rtc-fix-printk-of-64-bit-res-on-32-bit-platform.patch
i2o-more-error-checking.patch
pnp-handle-sysfs-errors.patch
rtc-handle-sysfs-errors.patch
sound-oss-emu10k1-handle-userspace-copy-errors.patch
spi-improve-sysfs-compiler-complaint-handling.patch
isdn-fix-drivers-by-handling-errors-thrown-by-readstat.patch
isdn-check-for-userspace-copy-faults.patch
atyfb-rivafb-minor-fixes.patch
md-conditionalize-some-code.patch
user-of-the-jiffies-rounding-patch-ata-subsystem.patch
git-gccbug.patch

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

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux