mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
msm: camera: cci: Add device managed alloc to balance free in remove
The devm_kfree call in remove is unbalanced without a devm_kzalloc. Add required kzalloc and free during probe to balance it. CRs-Fixed: 2584631 Change-Id: I14164405e62036f7918b858d978afe454e4feb4a Signed-off-by: Mukund Madhusudan Atre <matre@codeaurora.org>
This commit is contained in:
parent
90d0abfbfd
commit
4e5ffd3ce0
1 changed files with 2 additions and 2 deletions
|
|
@ -376,7 +376,7 @@ static int cam_cci_component_bind(struct device *dev,
|
|||
int rc = 0;
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
|
||||
new_cci_dev = kzalloc(sizeof(struct cci_device),
|
||||
new_cci_dev = devm_kzalloc(&pdev->dev, sizeof(struct cci_device),
|
||||
GFP_KERNEL);
|
||||
if (!new_cci_dev)
|
||||
return -ENOMEM;
|
||||
|
|
@ -445,7 +445,7 @@ static int cam_cci_component_bind(struct device *dev,
|
|||
CAM_DBG(CAM_CCI, "Component bound successfully");
|
||||
return rc;
|
||||
cci_no_resource:
|
||||
kfree(new_cci_dev);
|
||||
devm_kfree(&pdev->dev, new_cci_dev);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue