msm: camera: icp: free device mem upon error
If icp hw type is invalid, free device memory allocation before returning error code. CRs-Fixed: 3385771 Change-Id: Ice9f533ead58d71aa5337ea57d85cfa97c898a2f Signed-off-by: Sokchetra Eung <quic_eung@quicinc.com>
This commit is contained in:

committed by
Camera Software Integration

orang tua
5abce6f5c7
melakukan
274dfda605
@@ -7309,7 +7309,8 @@ static int cam_icp_mgr_alloc_devs(struct device_node *np,
|
||||
if (!CAM_ICP_IS_VALID_HW_DEV_TYPE(icp_hw_type)) {
|
||||
CAM_ERR(CAM_ICP, "[%s] Invalid hw dev type: %u",
|
||||
hw_mgr->hw_mgr_name, icp_hw_type);
|
||||
return -EINVAL;
|
||||
rc = -EINVAL;
|
||||
goto free_devs;
|
||||
}
|
||||
|
||||
hw_mgr->devices[icp_hw_type] = devices;
|
||||
|
Reference in New Issue
Block a user