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

Commit dd9ad082 authored by Venkata Narendra Kumar Gutta's avatar Venkata Narendra Kumar Gutta Committed by Jeevan Shriram
Browse files

soc: qcom: pil: Deregister from msm bus if PIL probe fails



Deregister client from msm bus driver if pil probe fails as msm bus
doesn't know that PIL probe failed.

Change-Id: I20cf9ffcb37e8db80dc7c3516407cf19e0e76690
Signed-off-by: default avatarVenkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>
parent e222d4df
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1117,14 +1117,14 @@ static int pil_tz_driver_probe(struct platform_device *pdev)
		if (rc) {
			dev_err(&pdev->dev, "Failed to find the pas_id(rc:%d)\n",
									rc);
			return rc;
			goto err_deregister_bus;
		}
		scm_pas_init(MSM_BUS_MASTER_CRYPTO_CORE_0);
	}

	rc = pil_desc_init(&d->desc);
	if (rc)
		return rc;
		goto err_deregister_bus;

	init_completion(&d->stop_ack);

@@ -1240,6 +1240,9 @@ static int pil_tz_driver_probe(struct platform_device *pdev)
err_ramdump:
	pil_desc_release(&d->desc);
	platform_set_drvdata(pdev, NULL);
err_deregister_bus:
	if (d->bus_client)
		msm_bus_scale_unregister_client(d->bus_client);

	return rc;
}