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

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
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment