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

Commit 11942680 authored by Steven Cahail's avatar Steven Cahail
Browse files

soc: qcom: glink: Make error codes negative in glink_smem_native_xprt



Positive error codes are returned in some places in
glink_smem_native_xprt.c. Per convention, these should be negative.

Return negative error codes instead.

Change-Id: Ib09f7216474554517aa477c517ce4b83dc87f7cc
Signed-off-by: default avatarSteven Cahail <scahail@codeaurora.org>
parent b4b39c98
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -2299,14 +2299,14 @@ static int glink_rpm_native_probe(struct platform_device *pdev)
								RPM_TOC_SIZE);
	tocp = (uint32_t *)toc;
	if (*tocp != RPM_TOC_ID) {
		rc = ENODEV;
		rc = -ENODEV;
		pr_err("%s: TOC id %d is not valid\n", __func__, *tocp);
		goto toc_init_fail;
	}
	++tocp;
	num_toc_entries = *tocp;
	if (num_toc_entries > RPM_MAX_TOC_ENTRIES) {
		rc = ENODEV;
		rc = -ENODEV;
		pr_err("%s: %d is too many toc entries\n", __func__,
							num_toc_entries);
		goto toc_init_fail;
@@ -2339,7 +2339,7 @@ static int glink_rpm_native_probe(struct platform_device *pdev)
		break;
	}
	if (!einfo->tx_fifo) {
		rc = ENODEV;
		rc = -ENODEV;
		pr_err("%s: tx fifo not found\n", __func__);
		goto toc_init_fail;
	}
@@ -2372,7 +2372,7 @@ static int glink_rpm_native_probe(struct platform_device *pdev)
		break;
	}
	if (!einfo->rx_fifo) {
		rc = ENODEV;
		rc = -ENODEV;
		pr_err("%s: rx fifo not found\n", __func__);
		goto toc_init_fail;
	}