Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit caa64ad2 authored by Linux Build Service Account's avatar Linux Build Service Account
Browse files

Merge 06c05d9f on remote branch

Change-Id: I994868e183364079d665f6993193ccd78081d57c
parents 6eb4b6a3 06c05d9f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2016-2020, 2022 The Linux Foundation. All rights reserved.
 */

#include <linux/module.h>
@@ -680,7 +680,7 @@ int cam_mem_mgr_alloc_and_map(struct cam_mem_mgr_alloc_cmd *cmd)
		if (rc) {
			CAM_ERR(CAM_MEM,
				"Failed in map_hw_va, len=%llu, flags=0x%x, fd=%d, region=%d, num_hdl=%d, rc=%d",
				cmd->len, cmd->flags, fd, region,
				len, cmd->flags, fd, region,
				cmd->num_hdl, rc);
			goto map_hw_fail;
		}
@@ -709,7 +709,7 @@ int cam_mem_mgr_alloc_and_map(struct cam_mem_mgr_alloc_cmd *cmd)
	tbl.bufq[idx].kmdvaddr = kvaddr;
	tbl.bufq[idx].vaddr = hw_vaddr;
	tbl.bufq[idx].dma_buf = dmabuf;
	tbl.bufq[idx].len = cmd->len;
	tbl.bufq[idx].len = len;
	tbl.bufq[idx].num_hdl = cmd->num_hdl;
	memcpy(tbl.bufq[idx].hdls, cmd->mmu_hdls,
		sizeof(int32_t) * cmd->num_hdl);
+10 −6
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2016-2020, The Linux Foundation. All rights reserved.
 * Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
 */

#include <linux/module.h>
@@ -1850,10 +1851,13 @@ static int __cam_req_mgr_create_subdevs(
 *
 */
static void __cam_req_mgr_destroy_subdev(
	struct cam_req_mgr_connected_device *l_device)
	struct cam_req_mgr_connected_device **l_device)
{
	kfree(l_device);
	l_device = NULL;
	CAM_DBG(CAM_CRM, "*l_device %pK", *l_device);
	if (*(l_device) != NULL) {
		kfree(*(l_device));
		*l_device = NULL;
	}
}

/**
@@ -3238,7 +3242,7 @@ static int __cam_req_mgr_unlink(struct cam_req_mgr_core_link *link)
	__cam_req_mgr_destroy_link_info(link);
	/* Free memory holding data of linked devs */

	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);

	/* Destroy the link handle */
	rc = cam_destroy_device_hdl(link->link_hdl);
@@ -3403,7 +3407,7 @@ int cam_req_mgr_link(struct cam_req_mgr_ver_info *link_info)
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
setup_failed:
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);
create_subdev_failed:
	cam_destroy_device_hdl(link->link_hdl);
	link_info->u.link_info_v1.link_hdl = -1;
@@ -3513,7 +3517,7 @@ int cam_req_mgr_link_v2(struct cam_req_mgr_ver_info *link_info)
	mutex_unlock(&g_crm_core_dev->crm_lock);
	return rc;
setup_failed:
	__cam_req_mgr_destroy_subdev(link->l_dev);
	__cam_req_mgr_destroy_subdev(&link->l_dev);
create_subdev_failed:
	cam_destroy_device_hdl(link->link_hdl);
	link_info->u.link_info_v2.link_hdl = -1;