Commit b7c3ca35 authored by Harshit Mogalapalli's avatar Harshit Mogalapalli Committed by Dipen Patel
Browse files

hte: tegra: Fix missing error code in tegra_hte_test_probe()



The value of 'ret' is zero when of_hte_req_count() fails to get number
of entitties to timestamp. And returning success(zero) on this failure
path is incorrect.

Fixes: 9a75a7cd ("hte: Add Tegra HTE test driver")
Signed-off-by: default avatarHarshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: default avatarDipen Patel <dipenp@nvidia.com>
Signed-off-by: default avatarDipen Patel <dipenp@nvidia.com>
parent 091ac92d
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -153,8 +153,10 @@ static int tegra_hte_test_probe(struct platform_device *pdev)
	}

	cnt = of_hte_req_count(hte.pdev);
	if (cnt < 0)
	if (cnt < 0) {
		ret = cnt;
		goto free_irq;
	}

	dev_info(&pdev->dev, "Total requested lines:%d\n", cnt);