[PATCH 2/2] Remove dead code from device_create_bonding

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

 



bonding_request_new always return valid pointer so there is not need
to check for NULL as this will never happen.
---
 src/device.c |    4 ----
 1 files changed, 0 insertions(+), 4 deletions(-)

diff --git a/src/device.c b/src/device.c
index 5224984..12463cf 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2303,10 +2303,6 @@ DBusMessage *device_create_bonding(struct btd_device *device,
 
 	bonding = bonding_request_new(conn, msg, device, agent_path,
 					capability);
-	if (!bonding) {
-		adapter_cancel_bonding(adapter, &device->bdaddr);
-		return NULL;
-	}
 
 	bonding->listener_id = g_dbus_add_disconnect_watch(conn,
 						dbus_message_get_sender(msg),
-- 
on behalf of ST-Ericsson

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


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux