mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
Merge "msm: camera: sensor: unregister subdev if cpas registration fails" into camera-kernel.lnx.4.0
This commit is contained in:
commit
9ef363c051
2 changed files with 8 additions and 2 deletions
|
|
@ -441,7 +441,7 @@ static int cam_cci_component_bind(struct device *dev,
|
|||
rc = cam_cpas_register_client(&cpas_parms);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CCI, "CPAS registration failed rc:%d", rc);
|
||||
goto cci_no_resource;
|
||||
goto cci_unregister_subdev;
|
||||
}
|
||||
|
||||
CAM_DBG(CAM_CCI, "CPAS registration successful handle=%d",
|
||||
|
|
@ -449,6 +449,9 @@ static int cam_cci_component_bind(struct device *dev,
|
|||
new_cci_dev->cpas_handle = cpas_parms.client_handle;
|
||||
CAM_DBG(CAM_CCI, "Component bound successfully");
|
||||
return rc;
|
||||
|
||||
cci_unregister_subdev:
|
||||
cam_unregister_subdev(&(new_cci_dev->v4l2_dev_str));
|
||||
cci_no_resource:
|
||||
devm_kfree(&pdev->dev, new_cci_dev);
|
||||
return rc;
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ static int cam_csiphy_component_bind(struct device *dev,
|
|||
rc = cam_cpas_register_client(&cpas_parms);
|
||||
if (rc) {
|
||||
CAM_ERR(CAM_CSIPHY, "CPAS registration failed rc: %d", rc);
|
||||
goto csiphy_no_resource;
|
||||
goto csiphy_unregister_subdev;
|
||||
}
|
||||
|
||||
CAM_DBG(CAM_CSIPHY, "CPAS registration successful handle=%d",
|
||||
|
|
@ -220,6 +220,9 @@ static int cam_csiphy_component_bind(struct device *dev,
|
|||
CAM_DBG(CAM_CSIPHY, "%s component bound successfully",
|
||||
pdev->name);
|
||||
return rc;
|
||||
|
||||
csiphy_unregister_subdev:
|
||||
cam_unregister_subdev(&(new_csiphy_dev->v4l2_dev_str));
|
||||
csiphy_no_resource:
|
||||
mutex_destroy(&new_csiphy_dev->mutex);
|
||||
kfree(new_csiphy_dev->ctrl_reg);
|
||||
|
|
|
|||
Loading…
Reference in a new issue