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

Commit aae1e6b1 authored by Lakshmi Narayana Kalavala's avatar Lakshmi Narayana Kalavala Committed by Gerrit - the friendly Code Review server
Browse files

msm: camera: Fix bitmap allocation sizes in camera



Ensure that correct bitmap size is passed during
initializaiton for icp frame process bitmap and
request manager handle generation utilities.

Change-Id: I92e279cfa026a0b755da6d9c627724a0e9a0357c
Signed-off-by: default avatarLakshmi Narayana Kalavala <lkalaval@codeaurora.org>
parent ffd90498
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ int cam_req_mgr_util_init(void)
	spin_unlock_bh(&hdl_tbl_lock);

	bitmap_size = BITS_TO_LONGS(CAM_REQ_MGR_MAX_HANDLES) * sizeof(long);
	hdl_tbl->bitmap = kzalloc(sizeof(bitmap_size), GFP_KERNEL);
	hdl_tbl->bitmap = kzalloc(bitmap_size, GFP_KERNEL);
	if (!hdl_tbl->bitmap) {
		rc = -ENOMEM;
		goto bitmap_alloc_fail;
+1 −1
Original line number Diff line number Diff line
@@ -1752,7 +1752,7 @@ static int cam_icp_mgr_acquire_hw(void *hw_mgr_priv, void *acquire_hw_args)

	bitmap_size = BITS_TO_LONGS(CAM_FRAME_CMD_MAX) * sizeof(long);
	ctx_data->hfi_frame_process.bitmap =
			kzalloc(sizeof(bitmap_size), GFP_KERNEL);
			kzalloc(bitmap_size, GFP_KERNEL);
	ctx_data->hfi_frame_process.bits = bitmap_size * BITS_PER_BYTE;
	mutex_init(&ctx_data->hfi_frame_process.lock);
	mutex_unlock(&ctx_data->ctx_mutex);