msm: cpp: De-init bandwidth manager during error conditions
Bandwidth manager is not de-initialized if an error happens during probe. Add a de-initialization sequence in error scenarios CRs-Fixed: 1076959 Change-Id: Ic3e5e51dcf95722ce81ea5546b2df99a4661a176 Signed-off-by: Krishnankutty Kolathappilly <kkolatha@codeaurora.org>
This commit is contained in:
parent
8ec8b328f3
commit
7ea18f1ce9
1 changed files with 8 additions and 2 deletions
|
@ -4051,7 +4051,7 @@ static int cpp_probe(struct platform_device *pdev)
|
|||
cpp_dev->state = CPP_STATE_BOOT;
|
||||
rc = cpp_init_hardware(cpp_dev);
|
||||
if (rc < 0)
|
||||
goto cpp_probe_init_error;
|
||||
goto bus_de_init;
|
||||
|
||||
media_entity_init(&cpp_dev->msm_sd.sd.entity, 0, NULL, 0);
|
||||
cpp_dev->msm_sd.sd.entity.type = MEDIA_ENT_T_V4L2_SUBDEV;
|
||||
|
@ -4090,7 +4090,7 @@ static int cpp_probe(struct platform_device *pdev)
|
|||
if (!cpp_dev->work) {
|
||||
pr_err("no enough memory\n");
|
||||
rc = -ENOMEM;
|
||||
goto cpp_probe_init_error;
|
||||
goto bus_de_init;
|
||||
}
|
||||
|
||||
INIT_WORK((struct work_struct *)cpp_dev->work, msm_cpp_do_timeout_work);
|
||||
|
@ -4110,6 +4110,12 @@ static int cpp_probe(struct platform_device *pdev)
|
|||
else
|
||||
CPP_DBG("FAILED.");
|
||||
return rc;
|
||||
|
||||
bus_de_init:
|
||||
if (cpp_dev->bus_master_flag)
|
||||
msm_cpp_deinit_bandwidth_mgr(cpp_dev);
|
||||
else
|
||||
msm_isp_deinit_bandwidth_mgr(ISP_CPP);
|
||||
cpp_probe_init_error:
|
||||
media_entity_cleanup(&cpp_dev->msm_sd.sd.entity);
|
||||
msm_sd_unregister(&cpp_dev->msm_sd);
|
||||
|
|
Loading…
Add table
Reference in a new issue