From patchwork Fri Nov 3 09:13:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 161205 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:8f47:0:b0:403:3b70:6f57 with SMTP id j7csp894055vqu; Fri, 3 Nov 2023 02:13:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF+1Ug0ZYIZzh2+avcTedpr8uLyDyD3/3UUxjVMfpYNg6aI659ZCNwnebyumV8lZJCCIngW X-Received: by 2002:a05:6870:4192:b0:1d6:97:bd7d with SMTP id y18-20020a056870419200b001d60097bd7dmr26321751oac.34.1699002839566; Fri, 03 Nov 2023 02:13:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1699002839; cv=pass; d=google.com; s=arc-20160816; b=NIcGolLA/ces9z8YoJGxxlQTlctJZXnqFzy2LiVUlg5fX2yH/YfSEnjNfLuSb+0WM/ WH913jY6wZFgDDZh1k0JJY3v0oiewfA2G5wTZIWxlrp9XNI+J4UjhcaYE1X71ygd9htc at3UTh1skSQS9SsWnp6Z621/09A2ul8IR51gry3R44A4qmgg15B+bbQEXM2qt0aIU4k0 uOAtOcTzw8Dp6frfIFDDI4XkydAB94FnQNMZJSXh9FBE01O07n0Px8OBqmnneZyQV51f VN8D2lIWPbDVyKft3DSlKFgk4ffm8Pvn4ot13eH+ZhVtlBFZ123xk7jnxE0vJGsHyDzb +5dA== 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:cc:to :content-language:subject:from:user-agent:date:message-id :dkim-signature; bh=CzHGoHdzG6OhdLHcyl9PZ34QCwkdgcvjB88vQ2frIl4=; fh=IfDCyBAQ+OCqZE/5MjZ0TiIb+LM6ZvAzg9rjFsECMmU=; b=rTmsQZyA8KRWjnGjjT8hhIO4QTk11hVdiAEog+RFg6LrpR+gGBUS3RPSrrVeW6bZ1M g8zHwpA9QTeQ0gm3DBRsjG2xHeiVwpcjNd+lM0UJN+xUlNgQbacC6wisBzxLYRHL/QiZ gKqFD7IadDE3IBkINRZJk5ou79cpyOjPGeGpWsNaquLzUlBNEmt63N4pJThnllycY5X9 7mpK7XVAjX7hSkDpAVmfNHM9lROLlL0jYaXgDbd4r8uqzUP+ZPZxsNqXJWl5jkeM/A8Q LBM86sCpMdk21ohOmjRAg2FNoQJ5YDag8Qd+QF+ieJHicWAF/tzPJHYBY9fdLzyVL5AL 0pYw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EUEIohOX; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id bv3-20020a632e03000000b0058bc1c85714si1179947pgb.467.2023.11.03.02.13.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 02:13:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=EUEIohOX; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id E246581B4ADC; Fri, 3 Nov 2023 02:13:54 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346906AbjKCJNp (ORCPT + 36 others); Fri, 3 Nov 2023 05:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46208 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346901AbjKCJNo (ORCPT ); Fri, 3 Nov 2023 05:13:44 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2064.outbound.protection.outlook.com [40.107.21.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187B4D4B; Fri, 3 Nov 2023 02:13:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UTMliLc/JPJoL3/CvsZBlPEZGN1rSO9zy9IWtwXCYs3L/KUETEO/sJrac6l0M8VIZY8mUigwB359FzX/cUcCy2ctXgjk0MqXVd+sXDW+55PnTr882tezJngkg6C+KPc/IDpilYpgFmQk7oQqPYOR8PrP22/qOUwpkvL2rYahHJ3m5P4CpPxPOV18p3CXIoHZaM8f4M67F1PzbyA+RUUjZ4TAtxW+FLdLJN1UWqr2NWjEvk3g25ykOQCs504uUucEZqKPK4iQOArGMZ6VLsC3QU0jTROlS9q+/Wgsmd5PiyVVKwyXHwNtry39s+KzI8MFWziqkeQ5P3CaurUq8z0NKg== 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=CzHGoHdzG6OhdLHcyl9PZ34QCwkdgcvjB88vQ2frIl4=; b=nSk78APNSe4+71sJNcQxVpU2X/BPlk5rAcmac6Fq4sQ+N2qNHzYfYlYYwSl6xmxIn7Yabx75BEEsBYxrELMAAAQqFjqU8wD5Yq5WTMxB9ph3fZHHBvSCgArvBBMzrADn+nPR+oqk5DPNdyNgDyQJ1baOJgs9qYJ13J3aU4MOYLHVy93fQXN4XX2ka8H/aRZrgdZTMZcl2r2xKHhwa6QBsAlGZ5othfiRf/EuT/VlSCaUmLO+3Lmnt7c8HywC+SBjvzxja9u+8YyDOBH769gQCBEddKsGTMi/3LP9B63ZTD0Bwb5PbASsjwNmDz5tX3SHtU0IbdQXhicg9ZlWPSFuQA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CzHGoHdzG6OhdLHcyl9PZ34QCwkdgcvjB88vQ2frIl4=; b=EUEIohOXII9MWovXMbcoF8jLKbhVEruSOQNJqaX20yUgRJVox0oww7YXeFkxTiR/q/2QM7Wyk94U3AC9LaQB/fTppbrgSf7uBPzKIwfwCOb1MBujtyV9Hlo9xffoOYcgyrhqXJlU+3wIoqeun3fvvUjwM0BECOkvkyFRjtijkPNbQGWTkJD658BbrIWIdDHlszvLIpBrB7LMpOyti5haFjBjdZaxY0KZguisUwa5LYR6aQDqUwhPh5K2NBvJC7TXIdpa91MAIDLEBjbQc9ZerzYTMJ1LiAk5mwcYE+YaueUsqmdrtUTEOvrWozs6Bc4461RjAY82yE7Q8ceSV7X+yw== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=siemens.com; Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) by AM8PR10MB4017.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:1ef::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.21; Fri, 3 Nov 2023 09:13:38 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8496:a3a3:d7a8:b24d]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::8496:a3a3:d7a8:b24d%4]) with mapi id 15.20.6954.021; Fri, 3 Nov 2023 09:13:38 +0000 Message-ID: Date: Fri, 3 Nov 2023 10:13:37 +0100 User-Agent: Mozilla Thunderbird From: Jan Kiszka Subject: [PATCH] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region Content-Language: en-US To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , MD Danish Anwar Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Lopes Ivo, Diogo Miguel (T CED IFD-PT)" , Nishanth Menon , "Su, Bao Cheng (RC-CN DF FA R&D)" X-ClientProxiedBy: FR0P281CA0122.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::12) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|AM8PR10MB4017:EE_ X-MS-Office365-Filtering-Correlation-Id: a81ee0fa-80ff-4029-5436-08dbdc4d2a50 X-LD-Processed: 38ae3bcd-9579-4fd4-adda-b42e1495d55a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gmSHsWbZZlBPToA1ZjDsZ+7YqJQnD1wROAV+1rz/ObLu7weFm5jEzRLsJ3i+a7jWefD4bGhkusLvdmzD8eA1f1y3yUSXTvg/0JPN2EWPmRAgJXV7RdOI2gBSB3G6acHbMUHM68zzbrI9N5Qxtaqu7ASYbaHJc68bFZkXxwxxaBjjKpDOzXOKFIykmk9UiDILqy5YhMmzpy+92IJ1KYMBj5ZQb4yIKjFy2yLHImwwBCS5y+kCdReOBcHbuJMBsUAq+v9LJbztaRfRAQ2uNVNVq8p/GtjXDxTwEhCbR6N2Wh3s6p6yH78EvFvUW8RWsAPwomG4ecpfyYX9UUIj9zRhja1CquZ1hJ/RPvGq0XLZrsxIRybzYWTnSB8hqGaYRZ4gih0x0jFt2h5Jo3aVIepc5eTZUvkcmdMW3Eaxg8Zs5rS3ySqwH2IhqaohYMO3oRc2/q5c6yiMjJt/MfJglsUpjwndV4CXhrIPJ40j/rDhF7OvYCCuj/lbudbxcxV5hPAYAN/pYNOrs09jVHKQklj4ZkeYI9AEFGiUVrn1PRCjAeq9XjoipvokL1jVs3peBmmiRuRfKpokfL2YuPPDKMOnPBkIzPAW72CT9FfpwULoD5QJ7xOQW7GbSLyiJfDRBFUS+okmsoLs2bqzi3GxaGse4Q== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(39860400002)(346002)(136003)(376002)(230922051799003)(1800799009)(64100799003)(451199024)(186009)(6512007)(2616005)(6486002)(478600001)(6506007)(44832011)(83380400001)(26005)(2906002)(107886003)(66946007)(5660300002)(41300700001)(4744005)(54906003)(66476007)(66556008)(316002)(110136005)(8676002)(4326008)(8936002)(36756003)(86362001)(31696002)(38100700002)(82960400001)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JvusEIYI5PKJlaRCxWw1rNPNw/TA?= =?utf-8?q?QdkRELc/ErMNVokkJZ7aQ6lFbURO7HTI68Vp9dAEGWJ6WuEO6idekLLrHJSE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3FkY9f5/7KuCZ5MlXn6JxHynBv0ORRNDNpkBYgh0Oil2xEyL1ZBd9SRXk?= =?utf-8?q?CcoT3Bef5OJIZF0f3rvQEKZXk1TsvWI13358QT60xyfvprjJTyJLNWpkRTs1yNFbk?= =?utf-8?q?9kHerRTTBkVn/hL/tDYiE41Yxj7/QcHZyLiy8jFxMb0QJHM9uU9u4sAiDrRX0MDFL?= =?utf-8?q?+Ga7tiVP2kpu0LQt91hyxzXrebQgGisepyVnBV6Ut/wBYb+EY7w/xGxokiMAI6NaM?= =?utf-8?q?E+2LnCvBSuUpwHgHyFkbIlmb2RdLfGoGDxymG8g5+CiGI+ezLpW+qqUITOd1MH5pf?= =?utf-8?q?TYZtLA+ph87e0anZb67ZifJzhjO9XnyLFUQBQorxFfKQ88HG0NzAZJiqg4Oh0mlGw?= =?utf-8?q?Qt3sZwKS/efqbEIlLbJ8oHGgN7odrXmt3taDM1UIOJrZNyp3ottxCcqeHn45q8NHv?= =?utf-8?q?I5VfKxIN2gxpIgW5QOJe9umMGw85krsLCfe14oERs9autYHt/79mB3I2r6cCQbtkJ?= =?utf-8?q?dyxjX50tT9sCGOKUW6l2tkL3vuFkfLl326yQxUlhiknuPvSpe4i1VcyfO3RCwh3IM?= =?utf-8?q?8Sqt3t4LIiESfrZoj9QPe+A3mLbw1k53fQ=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: a81ee0fa-80ff-4029-5436-08dbdc4d2a50 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2023 09:13:38.4743 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RplqojYZR1Qpm6UpkLFAYAwerir/xPGVFR//YTZqzsbz/wGKHxhEqWJ/N6B2EOxvNw2gPbCKwvqjZtdSTahiyQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR10MB4017 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email 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 (agentk.vger.email [0.0.0.0]); Fri, 03 Nov 2023 02:13:54 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781533601093423018 X-GMAIL-MSGID: 1781533601093423018 From: Jan Kiszka We were just continuing in this case, surely not desired. Signed-off-by: Jan Kiszka --- drivers/net/ethernet/ti/icssg/icssg_prueth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c index 0242e123fc05..70c696ef0177 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -2064,7 +2064,7 @@ static int prueth_probe(struct platform_device *pdev) &prueth->shram); if (ret) { dev_err(dev, "unable to get PRUSS SHRD RAM2: %d\n", ret); - pruss_put(prueth->pruss); + goto put_pruss; } prueth->sram_pool = of_gen_pool_get(np, "sram", 0); @@ -2209,6 +2209,8 @@ static int prueth_probe(struct platform_device *pdev) put_mem: pruss_release_mem_region(prueth->pruss, &prueth->shram); + +put_pruss: pruss_put(prueth->pruss); put_cores: