Here the variable iconn never be NULL, so no need to check it against NULL. --- input/device.c | 5 ----- 1 files changed, 0 insertions(+), 5 deletions(-) diff --git a/input/device.c b/input/device.c index 77e77b3..e2c48b9 100644 --- a/input/device.c +++ b/input/device.c @@ -1153,8 +1153,6 @@ int input_device_register(DBusConnection *conn, struct btd_device *device, } iconn = input_conn_new(idev, uuid, timeout); - if (!iconn) - return -EINVAL; idev->connections = g_slist_append(idev->connections, iconn); @@ -1176,9 +1174,6 @@ int fake_input_register(DBusConnection *conn, struct btd_device *device, } iconn = input_conn_new(idev, uuid, 0); - if (!iconn) - return -EINVAL; - iconn->fake = g_new0(struct fake_input, 1); iconn->fake->ch = channel; iconn->fake->connect = rfcomm_connect; -- 1.7.4.1 -- 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