From 0691fd950c7c3b32796f1af3379fe41c9624f243 Mon Sep 17 00:00:00 2001 From: Nishant Chaprana Date: Mon, 15 Jul 2019 15:35:01 +0530 Subject: [PATCH] Removed redundant check for list pointer in __uam_core_get_dev_tech_info() Change-Id: Ic7cb291b8927c4e0cd4604e1a4d5e32d2358c774 Signed-off-by: Nishant Chaprana --- ua-daemon/src/ua-manager-core.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ua-daemon/src/ua-manager-core.c b/ua-daemon/src/ua-manager-core.c index 23ad4c3..6503ea1 100755 --- a/ua-daemon/src/ua-manager-core.c +++ b/ua-daemon/src/ua-manager-core.c @@ -1443,8 +1443,7 @@ static uam_db_tech_info_t *__uam_core_get_dev_tech_info(const char *device_id, i } device = l->data; - if (!(device->supported_techs & tech_type)) - if (NULL == l) { + if (!device || !(device->supported_techs & tech_type)) { UAM_DBG("Device type [0x%2.2X] for deviceId [%s] not found", tech_type, device_id); return NULL; -- 2.7.4