From 8f85b820e67373e84144972f8308bed71a6f2096 Mon Sep 17 00:00:00 2001 From: Syam Sidhardhan Date: Wed, 23 May 2012 21:27:32 +0530 Subject: [PATCH] input: Remove unwanted codes from device Here the variable iconn never be NULL, so no need to check it against NULL. --- input/device.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/input/device.c b/input/device.c index 77e77b3fe..e2c48b952 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; -- 2.47.3