Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp780846rdh; Thu, 26 Oct 2023 16:05:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9OdvGn/8I/D1Z+4vFXYZW+3RvkMmapE7mnnNjg046u8ecbSKOfF/tLMB7LuoZV6yRt80V X-Received: by 2002:a5b:c0a:0:b0:d71:6b6e:1071 with SMTP id f10-20020a5b0c0a000000b00d716b6e1071mr793102ybq.32.1698361510468; Thu, 26 Oct 2023 16:05:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1698361510; cv=pass; d=google.com; s=arc-20160816; b=dnpudpzoAVgJv/JHfZGFNJnTi1nfNvG/w6r7P0q6qqN82vzKIdqbYyfajVoDtNyPAQ Hii6LQL6afe1e3ilH9MEkYC+z2PWSsYOkNDU7y0zhu8fa2fAVqkbd4cj2hauG8LJPZdj PeX9ua6L7SDUS13X5cGLomluQPVMp86D2hAIWroLGSfV1Buompn0RR28I+MCS1+pa5op xdC/LsBvoxHi/m6wR18D6VweJZ6XhmVTm6TXQIqmkn31iBKBV3hFRbzkXF0Jzxae8fE3 +YxcQdq3KLq8kOq/5n9FIsR5p3PFnxhMpeqbequcilSWomHXyl5W+jQcjgTRwzmkLkls MpFA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=dzSmm7BVOqdMePxZ/24VRo+7s7kctwfthrsVrvKuw9A=; fh=r1yOO2ELvDhaFE3TYuMrUCUqTLcbgWhQ1IIwY46lobI=; b=XTWoP3sKE4VkolngxvUMDfTyjEERvhBQQX1rRB3VKDUgoEHCeoJluIgOmra37MTQPF 3kWPgAU/LZ83pB5ry1wU7c6Idfb4pk6pZl4QaY+feWSO+fs+1mRmrJiOAkwR6chzwflh C6A6RfkWImi6nsaUkolaYY0Nq6Jktb2ufxv8iq0Une4WefrlGKalrQEc9x5k2038mRyW J5ka4QmY5M4T8sj1XaVwVsrR8AJtuBeuDDMY1iICDMEOvbf3Sus7LFXOoUwCFdzOVXdh xQH2vjp1Z1L9/H0sG0MUi8F2ImMAt0Zh9Pf6NuPfH+WXzgTKukKxX8zilnrw+M0e+0LX cImg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=gCT4WnCR; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y4-20020a25dc04000000b00da04908d3e1si686957ybe.613.2023.10.26.16.05.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Oct 2023 16:05:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b=gCT4WnCR; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 09801827007F; Thu, 26 Oct 2023 16:05:09 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232068AbjJZXFF (ORCPT + 99 others); Thu, 26 Oct 2023 19:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46570 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229694AbjJZXFE (ORCPT ); Thu, 26 Oct 2023 19:05:04 -0400 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2081.outbound.protection.outlook.com [40.107.237.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90BC01A7; Thu, 26 Oct 2023 16:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bZCdLMG82eTyDMSkSnNX3pQGMCaN3LpYCGPcXE/6XTJWb1xt8xfbXRWirtXTkerC6IcfNQ43XXNfd7yXKvJ5AwThMPsAlGbI2fHPSXWmC5ySHWeav1QqQ4BnBqMBcr+PZjfCP36HqIImemZAVeQGL0g5rmsowimnb403Gt6tUr7MTxxz8TBbcVsbrLbXPZWj2MHOpvNqhev6JuKWZM8EoyuH2bH1MkHHD9e14RHi6TEF7owN7VA1vhOMd9PwMjVLVtUrm5eon3XIORzfwUD1Lo7hCCRW9gvQj9JqKntCwMKyLalo6WMxe/aLEEYaggXbMDQt4g3L4gk4y2MKY/7Byg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=dzSmm7BVOqdMePxZ/24VRo+7s7kctwfthrsVrvKuw9A=; b=Pblv+2tsigAgugXYmB6hZDCDD8gt3GXIpAC+TqUYbFKLVDAK1ayfpNbOmV6VtSL186t1nEh/MVpj+3FaXHY4zhe+mQw3FBgO0iGNi0yONyjE90rToUwGOiD6M3fKsT+PFQvZ48HVPqX1LzkT0+O1LizSet8FyRYkEGy3SmCOtc3hHfbr6W0ctCQtVeVU1hoKE/TMBnWgShF+EWD0/RXUa+DQhYJi8bhppwCjAD1v9eOMEMOKVZJ8+UK+t9mVzCj3ehw5c5oWfZBOB7rbdiaYehNR3iE66Bu4uk1X0W6t4ICRuJdvwlRH0YMMCOdJJMdVdaIQ4Ib6GzeTrwZbB42rdg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dzSmm7BVOqdMePxZ/24VRo+7s7kctwfthrsVrvKuw9A=; b=gCT4WnCR+V9rronmu8ec/ssTBbMNz+RgNsnlJCbu6/50ifh6+iE1nXdA5GAU/OwDMIMGo5WLvVWhouwBHzPur+kx122ho/nnDa3n6t8mWP6azLBXQziI3bIvAEYho0EGhU8xWkKy8+GXBH5kbJGlZRUjbPPyOoZv7wG6AKpXLfi2qBql7gEPdP/QixQNZadd2VTQG8SzOLBqJB9mpB04aGM2LfFqCm3hLltbv/gHVAV3+4vGTWmadI19cTeGObRYfpfdg0nTnmiZCobHXGCNTUvjc4EmmT53fFf8uFiQFCNAeQKcj8y4xl9CGk8E5VA9T5c22+BdS53WZoD0mKZxEA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from IA1PR12MB6604.namprd12.prod.outlook.com (2603:10b6:208:3a0::7) by SJ0PR12MB6805.namprd12.prod.outlook.com (2603:10b6:a03:44f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.19; Thu, 26 Oct 2023 23:04:59 +0000 Received: from IA1PR12MB6604.namprd12.prod.outlook.com ([fe80::16f8:183d:56cb:ba69]) by IA1PR12MB6604.namprd12.prod.outlook.com ([fe80::16f8:183d:56cb:ba69%6]) with mapi id 15.20.6907.028; Thu, 26 Oct 2023 23:04:59 +0000 Message-ID: Date: Thu, 26 Oct 2023 16:04:56 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH] hte: tegra: Fix missing error code in tegra_hte_test_probe() Content-Language: en-US To: Harshit Mogalapalli , Thierry Reding , Jonathan Hunter , timestamp@lists.linux.dev, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Cc: dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com References: <20231026075328.996704-1-harshit.m.mogalapalli@oracle.com> X-Nvconfidentiality: public From: Dipen Patel In-Reply-To: <20231026075328.996704-1-harshit.m.mogalapalli@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: BY3PR05CA0042.namprd05.prod.outlook.com (2603:10b6:a03:39b::17) To IA1PR12MB6604.namprd12.prod.outlook.com (2603:10b6:208:3a0::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: IA1PR12MB6604:EE_|SJ0PR12MB6805:EE_ X-MS-Office365-Filtering-Correlation-Id: 59d0e1ca-ef3d-45cd-2e59-08dbd677fa29 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: PvCl3GbbgVbJRKWPminux3YekXFNmSkhWg2Ieyy9PXYaZC3bf7gcCRtDzHemcbyupfGtPBleiyphmd477UTpfIJ32PIEgFrTRMvqA0WujqKgI2bTOsDHI3/ozhT8IMCO0VITJGUzu4W8mhUWA09s+TtLhU68CInj/CntCR2PRjAqKzXGIzQHE2pDBgCqj7LjBqwhGEm5UuqSMy9grgyvMKMp1D+tVuP1OavLLoNqyZMO+XkLwF1IENNuoA3r/bEQyqhSgMRzUfwDBL/a3+2MdejpRQt5qq9sxXLHTbyyWBC4ioS6JITm4Y4TT6xjTGf116DRH9x+nH6UgpOmbY2wtJJ6UqwpBnCl04zm/jqO9s+Q+lUg3FWw3lyALY/VwBbPrmrAQJo7i1C7Ixct7T17T6Eg0iE8K74XJnTwEbnMVwngKuG3FtMqbcd9iubmEp0Ap6dp+TPeI7OSkaRfyrRO+2fJzYNrECDvQiJmshabH/nqV6D4Y5eOjg2u+EXen5antzCVsmeDLLR18vNW1lzHJtLlpu0UGodedbxyzk3+mD+z9cMTD/1gTSskr6tVJY3Ie1nnaveBjcJ/TgQfbCekjj6GCssbW7Q+yUh3XHU2zoBu9iEQZ63qoZz4SNDsd+6S/O4mLIr6SPhW+TBciAnChQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:IA1PR12MB6604.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(136003)(39860400002)(376002)(396003)(346002)(366004)(230922051799003)(1800799009)(451199024)(186009)(64100799003)(31696002)(6486002)(8676002)(8936002)(31686004)(6666004)(66946007)(66476007)(66556008)(110136005)(86362001)(4326008)(478600001)(41300700001)(5660300002)(2906002)(316002)(6506007)(53546011)(38100700002)(36756003)(2616005)(26005)(6512007)(83380400001)(43740500002)(45980500001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WEhVQktnejJjcjRqSy9nNXRyc0daQm53QmxtdHY4ZGZWMUxUb05pL3JiYW5z?= =?utf-8?B?bWpuSUNZeEJHZ2VSdHg5YzdDb1FLYjJPUWVvSCsyV2tUVzgrVi8yVGVmbjJT?= =?utf-8?B?TXgxeE1lN1VMdWxyZmxMdCtOeUR6bE8zM3c2dnVXazdPTjRvNTI4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3WjZSbFhpZVdtRGRnbWNUUDdMYklKcWxMMkkydTVW?= =?utf-8?B?QTRsR0pJTWZGbWVVSlo0dUIzTnV1ZlVOWDhpMEJqUVpocE5DWXY3aUxZVTE1?= =?utf-8?B?eTF0SHF3N1RxQlRFQjVJaFdMY0psbC9UT2J1ejlvbTdaT1krWDlNYXlheUdu?= =?utf-8?Q?EKXR1NJKKf6Fn5oGNLt3sJAqN?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 59d0e1ca-ef3d-45cd-2e59-08dbd677fa29 X-MS-Exchange-CrossTenant-AuthSource: IA1PR12MB6604.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Oct 2023 23:04:59.1396 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: i/QQvBy34QqQ6jQ1IEMqwi2c7uEF+8eTlHS+UM80FOYXMW2svekyyiS8oaJxHSPqmoRPBS6FBeneuBkVVMag/w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB6805 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 26 Oct 2023 16:05:09 -0700 (PDT) On 10/26/23 12:53 AM, Harshit Mogalapalli wrote: > 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 > --- > This is found using static analysis with smatch, only compile tested. > --- > 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 ba37a5efbf82..ab2edff018eb 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); > Reviewed-by: Dipen Patel