diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2023-10-26 10:53:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-11-20 13:51:58 +0300 |
commit | 4d37df40b103ff861de7fc22790151610e366153 (patch) | |
tree | 7978c2319cf500f5a08bf9fe3bcb14c98d6566ab /drivers/hte | |
parent | a671a41d60d37b0e985662e804f04fb074d0daeb (diff) | |
download | linux-4d37df40b103ff861de7fc22790151610e366153.tar.xz |
hte: tegra: Fix missing error code in tegra_hte_test_probe()
[ Upstream commit b7c3ca3553d1de5e86c85636828e186d30cd0628 ]
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: 9a75a7cd03c9 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/hte')
-rw-r--r-- | drivers/hte/hte-tegra194-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c index ce8c44e79221..60f0ef2cb324 100644 --- a/drivers/hte/hte-tegra194-test.c +++ b/drivers/hte/hte-tegra194-test.c @@ -154,8 +154,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); |