Loading drivers/platform/msm/msm_bus/msm_bus_arb_adhoc.c +13 −5 Original line number Diff line number Diff line Loading @@ -984,7 +984,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) lnode = kzalloc(pdata->usecase->num_paths * sizeof(int), GFP_KERNEL); if (ZERO_OR_NULL_PTR(lnode)) { MSM_BUS_ERR("%s: Error allocating pathnode ptr!", __func__); goto exit_register_client; goto exit_lnode_malloc_fail; } client->src_pnode = lnode; Loading @@ -992,7 +992,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) sizeof(struct device *), GFP_KERNEL); if (IS_ERR_OR_NULL(client->src_devs)) { MSM_BUS_ERR("%s: Error allocating pathnode ptr!", __func__); goto exit_register_client; goto exit_src_dev_malloc_fail; } client->curr = -1; Loading @@ -1003,7 +1003,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if ((src < 0) || (dest < 0)) { MSM_BUS_ERR("%s:Invalid src/dst.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } dev = bus_find_device(&msm_bus_type, NULL, (void *) &src, Loading @@ -1011,7 +1011,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if (IS_ERR_OR_NULL(dev)) { MSM_BUS_ERR("%s:Failed to find path.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } client->src_devs[i] = dev; Loading @@ -1019,7 +1019,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if (lnode[i] < 0) { MSM_BUS_ERR("%s:Failed to find path.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } } Loading @@ -1028,6 +1028,14 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) handle); MSM_BUS_DBG("%s:Client handle %d %s", __func__, handle, client->pdata->name); rt_mutex_unlock(&msm_bus_adhoc_lock); return handle; exit_invalid_data: kfree(client->src_devs); exit_src_dev_malloc_fail: kfree(lnode); exit_lnode_malloc_fail: kfree(client); exit_register_client: rt_mutex_unlock(&msm_bus_adhoc_lock); return handle; Loading Loading
drivers/platform/msm/msm_bus/msm_bus_arb_adhoc.c +13 −5 Original line number Diff line number Diff line Loading @@ -984,7 +984,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) lnode = kzalloc(pdata->usecase->num_paths * sizeof(int), GFP_KERNEL); if (ZERO_OR_NULL_PTR(lnode)) { MSM_BUS_ERR("%s: Error allocating pathnode ptr!", __func__); goto exit_register_client; goto exit_lnode_malloc_fail; } client->src_pnode = lnode; Loading @@ -992,7 +992,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) sizeof(struct device *), GFP_KERNEL); if (IS_ERR_OR_NULL(client->src_devs)) { MSM_BUS_ERR("%s: Error allocating pathnode ptr!", __func__); goto exit_register_client; goto exit_src_dev_malloc_fail; } client->curr = -1; Loading @@ -1003,7 +1003,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if ((src < 0) || (dest < 0)) { MSM_BUS_ERR("%s:Invalid src/dst.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } dev = bus_find_device(&msm_bus_type, NULL, (void *) &src, Loading @@ -1011,7 +1011,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if (IS_ERR_OR_NULL(dev)) { MSM_BUS_ERR("%s:Failed to find path.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } client->src_devs[i] = dev; Loading @@ -1019,7 +1019,7 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) if (lnode[i] < 0) { MSM_BUS_ERR("%s:Failed to find path.src %d dest %d", __func__, src, dest); goto exit_register_client; goto exit_invalid_data; } } Loading @@ -1028,6 +1028,14 @@ static uint32_t register_client_adhoc(struct msm_bus_scale_pdata *pdata) handle); MSM_BUS_DBG("%s:Client handle %d %s", __func__, handle, client->pdata->name); rt_mutex_unlock(&msm_bus_adhoc_lock); return handle; exit_invalid_data: kfree(client->src_devs); exit_src_dev_malloc_fail: kfree(lnode); exit_lnode_malloc_fail: kfree(client); exit_register_client: rt_mutex_unlock(&msm_bus_adhoc_lock); return handle; Loading