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

Commit 6c15722b authored by Akash Asthana's avatar Akash Asthana Committed by Gerrit - the friendly Code Review server
Browse files

qcom-geni-se: Handle return value from iommu_map_and_attach function



There seems an issue of not handling failures from
geni_se_iommu_map_and_attach(). This change takes care
of returning value appropriately to the caller.

Change-Id: I87693c83f19e0dc013c81d89bd9f03207fde2d69
Signed-off-by: default avatarAkash Asthana <akashast@codeaurora.org>
parent 4d2982a4
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -1077,10 +1077,15 @@ int geni_se_resources_init(struct se_geni_rsc *rsc,
	ret = of_property_read_string(geni_se_dev->dev->of_node,
					"qcom,iommu-dma", &mode);

	if ((ret == 0) && (strcmp(mode, "disabled") == 0))
		geni_se_iommu_map_and_attach(geni_se_dev);
	if ((ret == 0) && (strcmp(mode, "disabled") == 0)) {
		ret = geni_se_iommu_map_and_attach(geni_se_dev);
		if (ret)
			GENI_SE_ERR(geni_se_dev->log_ctx, false, NULL,
				"%s: Error %d iommu_map_and_attach\n",
					 __func__, ret);
	}

	return 0;
	return ret;
}
EXPORT_SYMBOL(geni_se_resources_init);