mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
msm: camera: Adds state variable in mem manager
Add state variable for camera mem manager to show initialization status. Ensure that all operations are rejected before initialization. Change-Id: I1ddbaaf6fbed59e4804476562c97f6895d99e916 Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
This commit is contained in:
parent
40047f58df
commit
aeffc3147d
1 changed files with 5 additions and 0 deletions
|
|
@ -234,6 +234,11 @@ int cam_mem_get_cpu_buf(int32_t buf_handle, uintptr_t *vaddr_ptr, size_t *len)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!atomic_read(&cam_mem_mgr_state)) {
|
||||
CAM_ERR(CAM_MEM, "failed. mem_mgr not initialized");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!buf_handle || !vaddr_ptr || !len)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue