mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 05:39:54 -04:00
Merge "msm: camera: cci: Add device managed alloc to balance free in remove" into camera-kernel.lnx.4.0
This commit is contained in:
commit
cffa3f9379
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