Loading drivers/crypto/msm/qcedev_smmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -350,8 +350,12 @@ int qcedev_check_and_map_buffer(void *handle, return 0; unmap: if (!found) if (!found) { qcedev_unmap_buffer(handle, mem_client, binfo); mutex_lock(&qce_hndl->registeredbufs.lock); list_del(&binfo->list); mutex_unlock(&qce_hndl->registeredbufs.lock); } error: kfree(binfo); Loading drivers/media/platform/msm/cvp/hfi_response_handler.c +5 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ static struct msm_cvp_inst *cvp_get_inst_from_id(struct msm_cvp_core *core, } } inst = match ? inst : NULL; inst = match && kref_get_unless_zero(&inst->kref) ? inst : NULL; mutex_unlock(&core->lock); } else { if (core->state == CVP_CORE_UNINIT) Loading Loading @@ -525,7 +525,7 @@ static int hfi_process_session_cvp_msg(u32 device_id, sess_msg = kmem_cache_alloc(cvp_driver->msg_cache, GFP_KERNEL); if (sess_msg == NULL) { dprintk(CVP_ERR, "%s runs out msg cache memory\n", __func__); return -ENOMEM; goto error_no_mem; } memcpy(&sess_msg->pkt, pkt, get_msg_size()); Loading @@ -548,11 +548,14 @@ static int hfi_process_session_cvp_msg(u32 device_id, info->response_type = HAL_NO_RESP; cvp_put_inst(inst); return 0; error_handle_msg: spin_unlock(&inst->session_queue.lock); kmem_cache_free(cvp_driver->msg_cache, sess_msg); error_no_mem: cvp_put_inst(inst); return -ENOMEM; } Loading drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +3 −4 Original line number Diff line number Diff line Loading @@ -843,9 +843,7 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) core->dec_codec_supported = sys_init_msg->dec_codec_supported; /* This should come from sys_init_done */ core->resources.max_inst_count = sys_init_msg->max_sessions_supported ? : MAX_SUPPORTED_INSTANCES; core->resources.max_inst_count = 16; core->resources.max_secure_inst_count = core->resources.max_secure_inst_count ? : Loading Loading @@ -5051,7 +5049,8 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst) /* ignore thumbnail session */ if (is_thumbnail_session(temp)) continue; mbpf += msm_comm_get_mbs_per_frame(inst); mbpf += NUM_MBS_PER_FRAME(inst->prop.width[OUTPUT_PORT], inst->prop.height[OUTPUT_PORT]); } mutex_unlock(&core->lock); if (mbpf > 2*capability->mbs_per_frame.max) { Loading drivers/platform/msm/ipa/ipa_v3/ipa_rt.c +9 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/bitops.h> Loading Loading @@ -1078,12 +1079,14 @@ static int __ipa_create_rt_entry(struct ipa3_rt_entry **entry, static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, struct ipa3_rt_tbl *tbl) { int id; int id, res = 0; if (tbl->rule_cnt < IPA_RULE_CNT_MAX) tbl->rule_cnt++; else return -EINVAL; else { res = -EINVAL; goto failed; } if (entry->hdr) entry->hdr->ref_cnt++; else if (entry->proc_ctx) Loading @@ -1092,6 +1095,7 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, if (id < 0) { IPAERR_RL("failed to add to tree\n"); WARN_ON_RATELIMIT_IPA(1); res = -EPERM; goto ipa_insert_failed; } IPADBG("add rt rule tbl_idx=%d rule_cnt=%d rule_id=%d\n", Loading @@ -1106,10 +1110,11 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, entry->hdr->ref_cnt--; else if (entry->proc_ctx) entry->proc_ctx->ref_cnt--; failed: idr_remove(tbl->rule_ids, entry->rule_id); list_del(&entry->link); kmem_cache_free(ipa3_ctx->rt_rule_cache, entry); return -EPERM; return res; } static int __ipa_add_rt_rule(enum ipa_ip_type ip, const char *name, Loading drivers/soc/qcom/smcinvoke.c +5 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) "smcinvoke: %s: " fmt, __func__ Loading Loading @@ -1672,8 +1672,11 @@ static long process_accept_req(struct file *filp, unsigned int cmd, } } while (!cb_txn); out: if (server_info) if (server_info) { mutex_lock(&g_smcinvoke_lock); kref_put(&server_info->ref_cnt, destroy_cb_server); mutex_unlock(&g_smcinvoke_lock); } if (ret && ret != -ERESTARTSYS) pr_err("accept thread returning with ret: %d\n", ret); Loading Loading
drivers/crypto/msm/qcedev_smmu.c +5 −1 Original line number Diff line number Diff line Loading @@ -350,8 +350,12 @@ int qcedev_check_and_map_buffer(void *handle, return 0; unmap: if (!found) if (!found) { qcedev_unmap_buffer(handle, mem_client, binfo); mutex_lock(&qce_hndl->registeredbufs.lock); list_del(&binfo->list); mutex_unlock(&qce_hndl->registeredbufs.lock); } error: kfree(binfo); Loading
drivers/media/platform/msm/cvp/hfi_response_handler.c +5 −2 Original line number Diff line number Diff line Loading @@ -426,7 +426,7 @@ static struct msm_cvp_inst *cvp_get_inst_from_id(struct msm_cvp_core *core, } } inst = match ? inst : NULL; inst = match && kref_get_unless_zero(&inst->kref) ? inst : NULL; mutex_unlock(&core->lock); } else { if (core->state == CVP_CORE_UNINIT) Loading Loading @@ -525,7 +525,7 @@ static int hfi_process_session_cvp_msg(u32 device_id, sess_msg = kmem_cache_alloc(cvp_driver->msg_cache, GFP_KERNEL); if (sess_msg == NULL) { dprintk(CVP_ERR, "%s runs out msg cache memory\n", __func__); return -ENOMEM; goto error_no_mem; } memcpy(&sess_msg->pkt, pkt, get_msg_size()); Loading @@ -548,11 +548,14 @@ static int hfi_process_session_cvp_msg(u32 device_id, info->response_type = HAL_NO_RESP; cvp_put_inst(inst); return 0; error_handle_msg: spin_unlock(&inst->session_queue.lock); kmem_cache_free(cvp_driver->msg_cache, sess_msg); error_no_mem: cvp_put_inst(inst); return -ENOMEM; } Loading
drivers/media/platform/msm/vidc_3x/msm_vidc_common.c +3 −4 Original line number Diff line number Diff line Loading @@ -843,9 +843,7 @@ static void handle_sys_init_done(enum hal_command_response cmd, void *data) core->dec_codec_supported = sys_init_msg->dec_codec_supported; /* This should come from sys_init_done */ core->resources.max_inst_count = sys_init_msg->max_sessions_supported ? : MAX_SUPPORTED_INSTANCES; core->resources.max_inst_count = 16; core->resources.max_secure_inst_count = core->resources.max_secure_inst_count ? : Loading Loading @@ -5051,7 +5049,8 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst) /* ignore thumbnail session */ if (is_thumbnail_session(temp)) continue; mbpf += msm_comm_get_mbs_per_frame(inst); mbpf += NUM_MBS_PER_FRAME(inst->prop.width[OUTPUT_PORT], inst->prop.height[OUTPUT_PORT]); } mutex_unlock(&core->lock); if (mbpf > 2*capability->mbs_per_frame.max) { Loading
drivers/platform/msm/ipa/ipa_v3/ipa_rt.c +9 −4 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2012-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #include <linux/bitops.h> Loading Loading @@ -1078,12 +1079,14 @@ static int __ipa_create_rt_entry(struct ipa3_rt_entry **entry, static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, struct ipa3_rt_tbl *tbl) { int id; int id, res = 0; if (tbl->rule_cnt < IPA_RULE_CNT_MAX) tbl->rule_cnt++; else return -EINVAL; else { res = -EINVAL; goto failed; } if (entry->hdr) entry->hdr->ref_cnt++; else if (entry->proc_ctx) Loading @@ -1092,6 +1095,7 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, if (id < 0) { IPAERR_RL("failed to add to tree\n"); WARN_ON_RATELIMIT_IPA(1); res = -EPERM; goto ipa_insert_failed; } IPADBG("add rt rule tbl_idx=%d rule_cnt=%d rule_id=%d\n", Loading @@ -1106,10 +1110,11 @@ static int __ipa_finish_rt_rule_add(struct ipa3_rt_entry *entry, u32 *rule_hdl, entry->hdr->ref_cnt--; else if (entry->proc_ctx) entry->proc_ctx->ref_cnt--; failed: idr_remove(tbl->rule_ids, entry->rule_id); list_del(&entry->link); kmem_cache_free(ipa3_ctx->rt_rule_cache, entry); return -EPERM; return res; } static int __ipa_add_rt_rule(enum ipa_ip_type ip, const char *name, Loading
drivers/soc/qcom/smcinvoke.c +5 −2 Original line number Diff line number Diff line // SPDX-License-Identifier: GPL-2.0-only /* * Copyright (c) 2016-2021, The Linux Foundation. All rights reserved. * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved. * Copyright (c) 2022, 2024 Qualcomm Innovation Center, Inc. All rights reserved. */ #define pr_fmt(fmt) "smcinvoke: %s: " fmt, __func__ Loading Loading @@ -1672,8 +1672,11 @@ static long process_accept_req(struct file *filp, unsigned int cmd, } } while (!cb_txn); out: if (server_info) if (server_info) { mutex_lock(&g_smcinvoke_lock); kref_put(&server_info->ref_cnt, destroy_cb_server); mutex_unlock(&g_smcinvoke_lock); } if (ret && ret != -ERESTARTSYS) pr_err("accept thread returning with ret: %d\n", ret); Loading