Skip to content
Snippets Groups Projects
Commit 853751b1 authored by Suman Mukherjee's avatar Suman Mukherjee Committed by Pat Tjin
Browse files

msm: camera: ispif: Validate vfe_intf parameter


Validate vfe_intf parameter to avoid invalid register access.

Bug: 19141503
Change-Id: Ie0b57071cc5fca1c48d3a5e2e7819f9af9ff544c
Signed-off-by: default avatarSuman Mukherjee <sumam@codeaurora.org>
Signed-off-by: default avatarPatrick Tjin <pattjin@google.com>
parent e9bed23d
No related merge requests found
......@@ -479,6 +479,11 @@ static int msm_ispif_config(struct ispif_device *ispif,
for (i = 0; i < params->num; i++) {
vfe_intf = params->entries[i].vfe_intf;
if (vfe_intf >= VFE_MAX) {
pr_err("%s: %d invalid i %d vfe_intf %d\n", __func__,
__LINE__, i, vfe_intf);
return -EINVAL;
}
if (!msm_ispif_is_intf_valid(ispif->csid_version,
vfe_intf)) {
pr_err("%s: invalid interface type\n", __func__);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment