Skip to content

Commit b7c3ca3

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: 9a75a7c ("hte: Add Tegra HTE test driver") Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> Reviewed-by: Dipen Patel <dipenp@nvidia.com> Signed-off-by: Dipen Patel <dipenp@nvidia.com>
1 parent 091ac92 commit b7c3ca3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/hte/hte-tegra194-test.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,10 @@ static int tegra_hte_test_probe(struct platform_device *pdev)
153153
}
154154

155155
cnt = of_hte_req_count(hte.pdev);
156-
if (cnt < 0)
156+
if (cnt < 0) {
157+
ret = cnt;
157158
goto free_irq;
159+
}
158160

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

0 commit comments

Comments
 (0)