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: 13444414 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EDE262D604 for ; Fri, 3 Nov 2023 09:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=siemens.com header.i=@siemens.com header.b="EUEIohOX" 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) Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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?JvusEIYI5PK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-8?q?cDimmYg8hhAHph7pJCl39IhnKGuV4nw3Ix8XGiaEtE3VTBZtluodf2Zss0GAmDqNx?= =?utf-8?q?LW+e/ZBz3FkY9f5/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-Patchwork-Delegate: kuba@kernel.org 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: