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

Commit 5aeba531 authored by Neeti Desai's avatar Neeti Desai
Browse files

msm: ocmem: Add NULL pointer check for req structure



BUG_ON if req structure returned from handle_to_req
returns a NULL pointer.

Change-Id: I8c0ddf7b6f51e3880cf7f9d8da767a43993b35fa
Signed-off-by: default avatarNeeti Desai <neetid@codeaurora.org>
parent 2c7d8bfe
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1600,6 +1600,8 @@ static void ocmem_rdm_worker(struct work_struct *work)
	struct ocmem_req *req = handle_to_req(handle);
	struct ocmem_buf *buffer = handle_to_buffer(handle);

	BUG_ON(!req);

	down_write(&req->rw_sem);
	offset = phys_to_offset(req->req_start);
	rc = ocmem_rdm_transfer(id, list, offset, direction);