Message ID | 20231016101608.993921-3-n-francis@ti.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp3357372vqb; Mon, 16 Oct 2023 03:17:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHNqaewS2zhxOwdi4mmlB4i12Yp3V/qVPxBXf/WqFb9jhB2JzTljvbbj1T/u+rmr3p7/6/I X-Received: by 2002:a05:6a00:391c:b0:690:d0d4:6fb0 with SMTP id fh28-20020a056a00391c00b00690d0d46fb0mr36840808pfb.3.1697451454816; Mon, 16 Oct 2023 03:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697451454; cv=none; d=google.com; s=arc-20160816; b=oe8dX1DZN4vYCSw8c1AhejEewBLyqI6Tem9lGFXM6vZ7h+L1M+JAW/RL0vKsbTxq6B /KsjiTuh8IecmFJ6s+TBOeiSpJarM5H3B6WQR5rZIO/N/dWoeUWJJNR5UQdPLKSgSXsW VC6aqTHX/CG0BNqpvtkDS1fOBjpC9S+Aq9+XR53MUIwD63oGIo60HUrP2uh80AnbZXsJ XckOHAALlceCu+HYUXdeP+I4MHYs+y2tZBG7t7dA69GF5HUVdYflMvDWThFOkSb+GED/ yG07wG1txfgRJehwosp7pc4KGSPNV8pkEJjaKQoeSGS3862IaG6ga5lqjawBlPW8gnX1 pOqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=88rE/gvk3TLI1pA0SASlq4XLga9h1ZmVfZYQHMJX+90=; fh=zXIzpqU6fkcvkKYOWPETYAc8kHdGN5li0oSb9j2GXFE=; b=k64U3LZumcKt4gD5hVr0cvRc6F1UQBrJPW6n7eK3mg3ctcAt8HZFVyCDK+ttmmoHRE NHwwBuaU+R4GjiKAEIB4llYEbPrIlBN4+xrKVACKVnqaTYLzFgk+GJUYJ/9TNokFZTFw DjESmip8LLoNFpwUcnPwNNZWwECLw5lb+B9otZyvQQvwiTYh0nnkfBYyRdy39+5g1rsw oSc7RfPPbt2oSfZq62w3wRMzNER9TxUSGXlc0nySLF72nq42orqqYAyNAPlXusKDg1Fj qbDINdr84hmPjfbrtpxOWVPrIsJ6wlCm0s6rgiUGpQJBPuNyDSLYY/O/DYQkcVAp9XRv G2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hS412G+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id 36-20020a630a24000000b00578a28df3e2si9640508pgk.816.2023.10.16.03.17.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 03:17:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=hS412G+E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6FBA88085FAB; Mon, 16 Oct 2023 03:17:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233252AbjJPKRJ (ORCPT <rfc822;hjfbswb@gmail.com> + 18 others); Mon, 16 Oct 2023 06:17:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233082AbjJPKQp (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 16 Oct 2023 06:16:45 -0400 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3806E8 for <linux-kernel@vger.kernel.org>; Mon, 16 Oct 2023 03:16:24 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 39GAGHs2099117; Mon, 16 Oct 2023 05:16:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1697451377; bh=88rE/gvk3TLI1pA0SASlq4XLga9h1ZmVfZYQHMJX+90=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=hS412G+E7j7iNqklPP1RXxtBSwNA0j2NRQK8Wi4Wj1Wl/J/Rc7MTG82wEwXMTkTVF lk+0qxro8gnN5nEctayAAvlD+sPAKX1LFIDSzJnl+Je9wj7xPAOcncQpYMfgiNZJRC SpAy1I9VNh+JaloxVQY+J29zF2PttU/eiv5pSphY= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 39GAGHjR029751 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 16 Oct 2023 05:16:17 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 16 Oct 2023 05:16:17 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE107.ent.ti.com (10.64.6.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 16 Oct 2023 05:16:17 -0500 Received: from a0497641-HP-Z2-Tower-G9-Workstation-Desktop-PC.dhcp.ti.com (ileaxei01-snat.itg.ti.com [10.180.69.5]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 39GAG90h033447; Mon, 16 Oct 2023 05:16:15 -0500 From: Neha Malcom Francis <n-francis@ti.com> To: <nm@ti.com>, <ssantosh@kernel.org>, <t-konduru@ti.com> CC: <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <n-francis@ti.com>, <u-kumar1@ti.com> Subject: [PATCH v3 2/3] soc: ti: k3-socinfo: Avoid overriding ret Date: Mon, 16 Oct 2023 15:46:07 +0530 Message-ID: <20231016101608.993921-3-n-francis@ti.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231016101608.993921-1-n-francis@ti.com> References: <20231016101608.993921-1-n-francis@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 16 Oct 2023 03:17:32 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1779906856432984347 X-GMAIL-MSGID: 1779906856432984347 |
Series |
Revamp k3-socinfo driver
|
|
Commit Message
Neha Malcom Francis
Oct. 16, 2023, 10:16 a.m. UTC
Avoid overriding the return value and make sure the right error code is
reflected. Here, if the partno is none of the identified partnos present
in k3_soc_ids[], return -ENODEV.
Signed-off-by: Neha Malcom Francis <n-francis@ti.com>
---
Changes since v2:
- new patch
drivers/soc/ti/k3-socinfo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c index d45f5cb955a6..7fc3548e084c 100644 --- a/drivers/soc/ti/k3-socinfo.c +++ b/drivers/soc/ti/k3-socinfo.c @@ -60,7 +60,7 @@ k3_chipinfo_partno_to_names(unsigned int partno, return 0; } - return -EINVAL; + return -ENODEV; } static int k3_chipinfo_probe(struct platform_device *pdev) @@ -111,8 +111,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev) ret = k3_chipinfo_partno_to_names(partno_id, soc_dev_attr); if (ret) { - dev_err(dev, "Unknown SoC JTAGID[0x%08X]\n", jtag_id); - ret = -ENODEV; + dev_err(dev, "Unknown SoC JTAGID[0x%08X]: %d\n", jtag_id, ret); goto err_free_rev; }