|
@@ -1,7 +1,7 @@
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
|
/*
|
|
/*
|
|
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
|
|
- * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
|
|
|
|
+ * Copyright (c) 2022-2024, Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
*/
|
|
|
|
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
@@ -14188,8 +14188,7 @@ static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
|
|
int rc = 0;
|
|
int rc = 0;
|
|
struct cam_hw_cmd_args *hw_cmd_args = cmd_args;
|
|
struct cam_hw_cmd_args *hw_cmd_args = cmd_args;
|
|
struct cam_ife_hw_mgr *hw_mgr = hw_mgr_priv;
|
|
struct cam_ife_hw_mgr *hw_mgr = hw_mgr_priv;
|
|
- struct cam_ife_hw_mgr_ctx *ctx = (struct cam_ife_hw_mgr_ctx *)
|
|
|
|
- hw_cmd_args->ctxt_to_hw_map;
|
|
|
|
|
|
+ struct cam_ife_hw_mgr_ctx *ctx = NULL;
|
|
struct cam_isp_hw_cmd_args *isp_hw_cmd_args = NULL;
|
|
struct cam_isp_hw_cmd_args *isp_hw_cmd_args = NULL;
|
|
struct cam_packet *packet;
|
|
struct cam_packet *packet;
|
|
unsigned long rem_jiffies = 0;
|
|
unsigned long rem_jiffies = 0;
|
|
@@ -14200,6 +14199,7 @@ static int cam_ife_mgr_cmd(void *hw_mgr_priv, void *cmd_args)
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ ctx = (struct cam_ife_hw_mgr_ctx *)hw_cmd_args->ctxt_to_hw_map;
|
|
if (!ctx || !ctx->flags.ctx_in_use) {
|
|
if (!ctx || !ctx->flags.ctx_in_use) {
|
|
CAM_ERR(CAM_ISP, "Fatal: Invalid context is used");
|
|
CAM_ERR(CAM_ISP, "Fatal: Invalid context is used");
|
|
return -EPERM;
|
|
return -EPERM;
|