msm: camera: isp: Check for NULL ptr
Validate the pointer for NULL prior to dereferencing it in ISP driver. CRs-Fixed: 2995152 Change-Id: I838ab1685ff7d270c9c28b0ec12177a25f33c144 Signed-off-by: Sokchetra Eung <eung@codeaurora.org>
This commit is contained in:

committed by
Gerrit - the friendly Code Review server

parent
46d07dd8d8
commit
2a1deb94b0
@@ -5794,6 +5794,11 @@ static int __cam_isp_ctx_get_isp_info(int32_t dev_hdl, void *data)
|
||||
|
||||
ctx = (struct cam_context *)cam_get_device_priv(dev_hdl);
|
||||
|
||||
if (!ctx) {
|
||||
CAM_ERR(CAM_ISP, "Cannot get context for handle %d", dev_hdl);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
isp_ctx = (struct cam_isp_context *)ctx->ctx_priv;
|
||||
|
||||
isp_dev->state = isp_ctx->substate_activated;
|
||||
|
Reference in New Issue
Block a user