Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 74f298e6 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: cpp: De-init bandwidth manager during error conditions"

parents 3b757bec 7ea18f1c
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -4198,7 +4198,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;
@@ -4237,7 +4237,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);
@@ -4257,6 +4257,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);