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

Commit 894723cf authored by Camera Software Integration's avatar Camera Software Integration Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sensor: unregister subdev if cpas registration fails" into...

Merge "msm: camera: sensor: unregister subdev if cpas registration fails" into camera-kernel.lnx.1.0
parents b41889a8 8a1156a1
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -469,13 +469,16 @@ static int cam_cci_platform_probe(struct platform_device *pdev)
	rc = cam_cpas_register_client(&cpas_parms);
	if (rc) {
		CAM_ERR(CAM_CCI, "CPAS registration failed");
		goto cci_no_resource;
		goto cci_unregister_subdev;
	}
	CAM_DBG(CAM_CCI, "CPAS registration successful handle=%d",
		cpas_parms.client_handle);
	new_cci_dev->cpas_handle = cpas_parms.client_handle;

	return rc;

cci_unregister_subdev:
	cam_unregister_subdev(&(new_cci_dev->v4l2_dev_str));
cci_no_resource:
	kfree(new_cci_dev);
	return rc;
+4 −1
Original line number Diff line number Diff line
@@ -202,13 +202,16 @@ static int32_t cam_csiphy_platform_probe(struct platform_device *pdev)
	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",
		cpas_parms.client_handle);
	new_csiphy_dev->cpas_handle = cpas_parms.client_handle;

	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);