From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FAD7C54FB9 for ; Wed, 15 Nov 2023 19:42:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234971AbjKOTmR (ORCPT ); Wed, 15 Nov 2023 14:42:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58746 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234982AbjKOTmP (ORCPT ); Wed, 15 Nov 2023 14:42:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7781189 for ; Wed, 15 Nov 2023 11:42:12 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0BDA0C433C8; Wed, 15 Nov 2023 19:42:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1700077332; bh=kc9yp/7Et9KYb4E3jsCtSfgypeyW3eV6b1NlDcUxNJs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wHMa8iq7MPVyAn1r9xoXFd++I6U3djySbsFOn+pxgMZ3PgjzhRZFo1sbEItkJZnf0 PNPeq6By8BPLvSFouyiQY8jLr4N91ujMMpMLM37YsGaVZrqNQNHcmCclUIwU+BTqZH 71COiJSX2GCB9jLWzr/mRmvR042muhk/sFKlgOg8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Harshit Mogalapalli , Dipen Patel , Sasha Levin Subject: [PATCH 6.6 210/603] hte: tegra: Fix missing error code in tegra_hte_test_probe() Date: Wed, 15 Nov 2023 14:12:35 -0500 Message-ID: <20231115191627.805562037@linuxfoundation.org> X-Mailer: git-send-email 2.42.1 In-Reply-To: <20231115191613.097702445@linuxfoundation.org> References: <20231115191613.097702445@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Harshit Mogalapalli [ 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 Reviewed-by: Dipen Patel Signed-off-by: Dipen Patel Signed-off-by: Sasha Levin --- drivers/hte/hte-tegra194-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hte/hte-tegra194-test.c b/drivers/hte/hte-tegra194-test.c index ba37a5efbf820..ab2edff018eb6 100644 --- a/drivers/hte/hte-tegra194-test.c +++ b/drivers/hte/hte-tegra194-test.c @@ -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); -- 2.42.0