Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp1498419rdf; Sun, 5 Nov 2023 01:52:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IGko0LJUjTyuxojeGwjnBLJuduDeNLbmT4CrR1aGMVbTiKpdyA302suknzJpRWQiv2/gOmP X-Received: by 2002:a0d:d811:0:b0:59f:b0d9:5df2 with SMTP id a17-20020a0dd811000000b0059fb0d95df2mr7268150ywe.0.1699177932068; Sun, 05 Nov 2023 01:52:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699177932; cv=pass; d=google.com; s=arc-20160816; b=hPMaepTx93ORX7CSwk7tnZWJUZ7RYrpnRW0UEs5CLz7EuQ0m1LDLkxd046TKqCvR4W 1kzKIjHvpIwvlUFzN4UtgtsTPQ/TWGckLbGt/XzgRO2AG62HEQ274bcVnD13IO/WcUhD 7ZyI7e7KxcEN1v+J3NdeO4u9Q7GOeXugR0swocIEOalJA/YfbjQuZy1TIth4RoHYXfl9 K0Uo57WOoWR/QLDF/KHXKeKz3li5DcuVT5fPQ/+5pvibyGhIR5vMoWg2+IbWucS79jUF 3Xv5rfv3grQW1vJ99ef2n/8BOx2+K99Je6R9asU2Nfb7xReEpOowHm9smDA18Fx/kSsk rhfg== 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=drNeabeAd5ABgckLRSZ+8wug+1K0rKfYuSxCN55WjXg=; fh=IfDCyBAQ+OCqZE/5MjZ0TiIb+LM6ZvAzg9rjFsECMmU=; b=fEGWnWKuxKp8HEVfRLXyIExelx85GfctRYN5XBTRl56S401HXZElI4qMOG+4XAFZhk 8Tx/TNllBCemkiBByjKdkcCc0KdfeGribCVylWpQxWns/mJu1uFF06kGiMK89v1FKnjO HWr3hRIf7YiaWWxm5PdI5uJZTuY77iPYa8X6XDkvXaL8t6/5pW8qvx9/laKGPyC5fwFP IWJ1RYihylV8BKqN37ntWiZCo9sjCgDF9LseoPN3p2jbNA5qYDR2dNRuglYVpAEvCf0S 2Kh0fDfitTOyLK89ljj/NP7WAlNGiVj4JsmZ4XCfiph6Dhhqj3xqBqr+E83qj7yxOObS qgTQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=RKuGPjrp; 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 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id i3-20020a170902c94300b001c5d09c7b0dsi5909655pla.458.2023.11.05.01.52.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 05 Nov 2023 01:52:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=RKuGPjrp; 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 23.128.96.35 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 groat.vger.email (Postfix) with ESMTP id 7BD8180990C4; Sun, 5 Nov 2023 01:52:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbjKEJvv (ORCPT + 99 others); Sun, 5 Nov 2023 04:51:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229644AbjKEJvs (ORCPT ); Sun, 5 Nov 2023 04:51:48 -0500 Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04on2046.outbound.protection.outlook.com [40.107.6.46]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAD82FF; Sun, 5 Nov 2023 01:51:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ICCxVThpwh/jym/TLoa4wk742ORY02C1JQUl01CGHCIkfh3czO4VBZZo+SrahUgYqMjB+D86ibwQXWl4PlpCnV6uk/4nKL23dlV8BdqCdp458P8mKxT/uK087VpWyyM+lyb31ZOYQSLtMDyK6QW3KZQa6qPJ8POazBbGbs4kt3CSul+A6blDUIIfmcj/qxkvF0j/BBvu0y/o2g6/rbPQuTY9NU/Otj/dHh4tN7iJKdboGcf2rKE2H/G1cjtKH+6lqgfSMeOML1ReL6WF81UYpPcZyMe9Hw+K/ZBO1B8npV5Iq8W71FUAWVXKsos8FgNV0Y5vv9fikDVcfHvupUN2tA== 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=drNeabeAd5ABgckLRSZ+8wug+1K0rKfYuSxCN55WjXg=; b=UQMli4Sx9Jm6wizkWCtn5NEo4XE/dtG/H/YLJF0lUUNOKJ9v1w9/CDw8gFH1C+WaSyDGHxOMKxg/9miUyzWJQivPAktJ8VOtjwXiEgLRgQAM0BLuiWrmEA057Wv2JLhFBLAt5wem+fUe5PqKqL8E68MdANcieelWMI+lddFuKFFhCtftI+LjpYISV/IbEzveZUfYX7T2t0p0hdbub0azRfGBCnmDw+S5mWONpEoh1y94C1PMQ9qR/aDla1ULS0mFn9+DFIjqGgBGbVHqlC8UpoAYr2dQ2mACVhtron+w3aSFF5hyQgXlccOl7mH6mgisQoSSshQcBLbq/5e9FEBLXA== 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=drNeabeAd5ABgckLRSZ+8wug+1K0rKfYuSxCN55WjXg=; b=RKuGPjrpOjPAbeK9A/V3RHvPoABwswKsK01tHWFUp9U53pApHmaZf9q008eEqgy+pte/fcj0th8kvJVkrou38WJM9RKa5kirQ/T2pKZ4jyiSldizelMqGV815OVwTqJypYzwIaN9gzGVzTU5JL+luHbkMjVLvZuER56FV2nyI8ONNHssgIGZcJSXLnvkz4wPAgZbBk1+rBW8WGza/XAVTkcV63iOFeqH+hgaMfkql7e7oJbvAKgMKZHIZO9CeA84DWpuGYca6Rj9CAxsd/KIwf/Rw2bLEPgkJ4TIKnEFkKHGidtla5bNnvCmdIKzeryTNisrNri644c/ObQdagLDIw== 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 DB4PR10MB6309.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:383::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6954.25; Sun, 5 Nov 2023 09:51:43 +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.027; Sun, 5 Nov 2023 09:51:43 +0000 Message-ID: <06ed13ca-9f52-4b49-9178-aae245bfd958@siemens.com> Date: Sun, 5 Nov 2023 10:51:42 +0100 User-Agent: Mozilla Thunderbird From: Jan Kiszka Subject: [PATCH net v2] 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)" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR3P281CA0202.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:a5::6) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|DB4PR10MB6309:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c7fcf9c-0d94-458a-460f-08dbdde4d0f0 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: oPCOrYrOCJ5vYClnMXbmDKxkTGnjM+HFzUG6svGPCK8GhavemrAZa8oOyGA8yC2jjW1sShU84Y57/bFWNXnNTZeyUnVOYDhOIRrdv1H92Jqex5mOLRDDWcJvd6G4uLxgFNQunyGXrFBYN5T6yVan1sIPOnGgR3wH18PQTNZVIa6QGU6TlG22u2fRzwAfJvMigUd18T3L6F/UDFXnAB6u5OTcx78pOqhPRPno88qJaET+kUFm9Z7fQK3gRW4rMLl9dr6n/tOSjcau8pk20pGISh1ZyoLALmWfZFgNU/JfkMt9uHCt3AivbbAf25XEVsOW2rNF5MoVbInQR38f6jDBFTqPjVmFEcA8/FNXxuiJGyBDLpAow+UDldL9hKxsLVRrt89NGaE2PtCvKuNunVYGPOKZk1f/Anbh8Dchl1cqgaIbkZHYkXaWrRShT3SNyrma3PaCzBpPKT8X7s1pEqUywB6hKpdO8wTXZrEz2LiWOXX7fmglK2dc4lcWxIoRy1WuGlX8SE5u9UabtsCp45SkBNUaaq26pudX6wxRop6ZMpi5k6+unf4CSoDF/GdUANxMz4GT+lKrxPqYRFDGbBg4+PwETRx1IxAYxr/6OZma/rDU6uOnf9JNcpq6LVNmd0uaW3WEIA8qW6NytOsS9kjmSQ== 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)(39860400002)(396003)(376002)(366004)(136003)(346002)(230922051799003)(451199024)(1800799009)(64100799003)(186009)(66476007)(31696002)(31686004)(86362001)(316002)(2906002)(41300700001)(5660300002)(44832011)(8676002)(8936002)(4326008)(36756003)(66556008)(38100700002)(82960400001)(54906003)(66946007)(110136005)(26005)(107886003)(6512007)(2616005)(478600001)(6486002)(83380400001)(6506007)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eTI3Y2dSVmVZWlBQZ0VHZURrbTFpQU1mSml1ZmNCSzZlaTh2V2JlYXJRb0dG?= =?utf-8?B?QXFiTGwxMGoxQXA3bzhTa2lZZnJzTGIyc2RVNWtWbnV5VElBdDkzcWN0dzVn?= =?utf-8?B?Z29TMytoL01qZFVlcDRhVnU4NG5JZklqL1dhdlpOOVVpU2svZUNuZ2x6QmpC?= =?utf-8?B?TGNFYkFqNk9wV1RUNUN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NCV3NY?= =?utf-8?B?ZytyVzRmS0lWdkNXYUpKT0hDdUhCeDlzZVE1VDBtSXl0WGFSanN5ZnZmVU1L?= =?utf-8?B?aXk0SHp0KzJveW1UdmJneWNsUllBb3lvdWxMUDRySlQxQkIxOXlQWmtPdDZv?= =?utf-8?Q?g2jt0/dd0KiInuRGa7J1yBRzE?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c7fcf9c-0d94-458a-460f-08dbdde4d0f0 X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Nov 2023 09:51:43.1869 (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: zB5cPa2hk/+RH3bCEd3HslDIFKmL/NTJg0UPZrZRTaqiSqhGaf8PjIRRqBMOIOaRNhJiv+J3BofeaIIoOVdPsw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR10MB6309 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, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.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 (groat.vger.email [0.0.0.0]); Sun, 05 Nov 2023 01:52:09 -0800 (PST) From: Jan Kiszka We were just continuing in this case, surely not desired. Fixes: 128d5874c082 ("net: ti: icssg-prueth: Add ICSSG ethernet driver") Signed-off-by: Jan Kiszka --- Changes in v2: - add proper tags 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 d119b2bb8158..845e8a782d3a 100644 --- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c +++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c @@ -2063,7 +2063,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); @@ -2215,6 +2215,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: -- 2.35.3