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

Commit 5fa0f373 authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: camera: sensor: unregister cci subdev if registration fails"

parents 4291114c 378051f3
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -442,13 +442,15 @@ 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;