[net,v3] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region
Message ID | bbc536dd-f64e-4ccf-89df-3afbe02b59ca@siemens.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b129:0:b0:403:3b70:6f57 with SMTP id q9csp1296837vqs; Fri, 10 Nov 2023 10:16:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IG6p5jhfWQNeOnqfMbvcE4fP9OcxqVgncVFXOjbJhXCJpkcVg3AFse1vt+VreEKT87jWNXW X-Received: by 2002:a05:6830:4409:b0:6d3:1369:af7 with SMTP id q9-20020a056830440900b006d313690af7mr10668661otv.14.1699640188400; Fri, 10 Nov 2023 10:16:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1699640188; cv=pass; d=google.com; s=arc-20160816; b=lPsM1GlYlueVH10yyVrBGt2NT7utNNTz7PyIu9Fz4v5w5pv/YtUw0FxBPqxqng4Eqg 2eqAxCW2hz3n2GQyfapD4OnT0oyTjhz8RG3EhITb4cYyrlYR2mxSIPXq4A0q4OPeDK0q 2dsDUCIDUFIyPKH19Z/SDjjCS0XrXf459UKqtvc5D2xl8NIDwEG6ecvRhLcbVvmwr0aS HJVT0W2AbkhEatY4sszsy/XjaY3qMIImdZhPQ83vPnPJ0BDrYqkdb0DB14CZ9z8dEd4W fIizworgFPVt+aGYjPmygQlJpaW6FUcokaABh0W3PZYKjucHPjfGbDKcPp3G1L6zOzyA Ubsg== 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=hilBLmloGI2KW5v4LTvPpRXcsATvidr46sHBmznin9g=; fh=Bh1tED8A02xIKs8YFveLxnppusWRExcSyo6FWFzkBL4=; b=teQJVG6qKMgXNjcDYwlXrp9tGgYmxuaNOT5SRhz4s/iESq3kLAzOkmhKuNGKr1C+P1 9oHzSRHhGGBDTJuI6Tj+oIt2zki09UHvPnf1p5EOLvX+Y9O2VhaYUlbHinZS7QsRxYio YU+fK8gl6ep3+6wFdJyFU+Z1l78IxPt2NdNAZ53tyvg9SEom79LyXN6ZnIxA2g0p3NoD NnVRkHwChQjw9waTncsp9o7quZjAULvG3fNgepQC1yVFFaueuTvug6IrirTcREhn72ac xn1NCyP8Maj7Z+csQisIUzC1TvMFJU9zwCS/1JKfXdwbfAbos44xyKnKE76TcSQOLcet aC8g== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=FDsqhMtH; 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 n19-20020a9d4d13000000b006ce2f2283a4si24077otf.360.2023.11.10.10.16.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Nov 2023 10:16:28 -0800 (PST) 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=FDsqhMtH; 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 DC46E805935E; Fri, 10 Nov 2023 10:14:36 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345192AbjKJSNJ (ORCPT <rfc822;lhua1029@gmail.com> + 30 others); Fri, 10 Nov 2023 13:13:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345795AbjKJSL0 (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 10 Nov 2023 13:11:26 -0500 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2060.outbound.protection.outlook.com [40.107.22.60]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BE8F3C6DC; Fri, 10 Nov 2023 08:13:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KlF5B1VwxJk65FKPPcw42ItGABlGeosmT2zMRdHTp53WQkx3819LnuKhlknga//uG7a9pgSU15sBdxwM1Q2TKoASdTp3/KveSNR0fHRvaUx9j43lXOgMICJUpXQm0M1lG6IRZPa5JpJCPltWNH16iC94DG7loLkxsfru23MU6Gn6pYAfnpWBhycGfS+Ymm7uRfQTB0b02UKk83spprPmdlS0FhCrYfGvQavsyMwPBkO01qVOK8kSVhILJISgzkeYPBcDtbTbQw/i+rRGHuHJArNvuLnQSiMlT8Ozp7a55jDjSdDFZmUwCCGG7kWHTXspe/zDE2nUB49mAyAx8b8MNQ== 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=hilBLmloGI2KW5v4LTvPpRXcsATvidr46sHBmznin9g=; b=nXSHWG6yi8OcCi8/5TLyg0M3tJTHH6Pt7aV9iZeTudoxkZAdprNxzCoTTcsvehHjHFjoPApdf0yejMVT9gadlvmiIXfnOfgPQnfljiY00P5szGKOegUtKhX02haQg45L2FtZlYDbt2rCkEFa+5LlhrURox9iWparMQ+Vdbr7pn0WYpTyDooFSZYRTladYAnoQETU+fngjU+zMIIMwY505MwedRmvuCuXeN/AwRyMyQryPT5IKrmY3NNbgTtz9sMyNA5zG6z063fS5qthDZhaS8L5CxkjRPDFvFUXTXP+bDB+JJWIZmDZvyGNzgJJtd7e/y6H6uJJRnObqxTv9E3eFA== 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=hilBLmloGI2KW5v4LTvPpRXcsATvidr46sHBmznin9g=; b=FDsqhMtHDgkGONFUmJid8NGtWNCeKfsGCUidELSXloN5ownIrHOipjc3I1vO44kHep4sVs8t+vM1r+8WaH76Ng/qrHqj0UcguTIfJVDnM/RQ3mjYgMyYGUo23M+/09zQ0/A8YAXJF1SAoOJPWuTPnu/UvvqKhOJFoEnmr/CRhXN+CbuxQ+vXe3Z9mfl4t6deFPNLE1U75Y0JnV4UmjFHaZw9GENtxQsWDQWYZuS6NJqgPovixlsTQ6aoz1YlKMo7c3lG3GPxirCY1oRFii/oe1q11soBq8QGpdLT3GOHdwHS0Y9gNhWOd/81b1T6XPaARSKaDrug00j2diqeNukqrg== 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 AS8PR10MB7970.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:568::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6977.18; Fri, 10 Nov 2023 16:13:15 +0000 Received: from AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::96c7:d239:1723:8761]) by AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM ([fe80::96c7:d239:1723:8761%4]) with mapi id 15.20.6977.018; Fri, 10 Nov 2023 16:13:15 +0000 Message-ID: <bbc536dd-f64e-4ccf-89df-3afbe02b59ca@siemens.com> Date: Fri, 10 Nov 2023 17:13:08 +0100 User-Agent: Mozilla Thunderbird From: Jan Kiszka <jan.kiszka@siemens.com> Subject: [PATCH net v3] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region Content-Language: en-US To: "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, MD Danish Anwar <danishanwar@ti.com> Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, "Lopes Ivo, Diogo Miguel (T CED IFD-PT)" <diogo.ivo@siemens.com>, Nishanth Menon <nm@ti.com>, "Su, Bao Cheng (RC-CN DF FA R&D)" <baocheng.su@siemens.com>, Wojciech Drewek <wojciech.drewek@intel.com>, Roger Quadros <rogerq@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: CH0PR04CA0026.namprd04.prod.outlook.com (2603:10b6:610:76::31) To AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:20b:588::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS4PR10MB6181:EE_|AS8PR10MB7970:EE_ X-MS-Office365-Filtering-Correlation-Id: 3086af3e-d324-470a-e115-08dbe207f1ab 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: um/ZetfxVeF82x7pULHS2LM2OXTODsdfUKpKZ2eDWfR2tQJt9hP5puG4TxSVHtoyLtexcn1Lex4wc78az4MmzSVtW/TJlvY+zP/oOzpvqKOZNZjb84c8XMS1VXGf9/cn5Vc7ArJYt5Ul6a129DuLuME9NbBd5A/o0+nW5xJz6zGWDoz/of0B5FF+tKAHbyObbJpg4jx18tl6e3qFbrzJT/0UeHyMRXxbiCLN8xMUG8QFFkGoC2bvNNE25aGYlk5qZTEYCJF/WchoRozeEjGRWa0duPFbSATXJZWvXBgZMfxdY+cWUqXOsvr2rwh3zptmBrfrMYyT+4cGonhHxTCbuK3Zg3IOSdreDEbPZkMPS10gY6IiTDODPDWdJt/IDVBVRGb8SNauYyLFOIChoipjBTV09utHqrKpJNhvPr1W7GpgZYxFDQRcD4jaeUQFwrawa94iXyPyvERWcr9/Jr1LSTlgKZbCGRePukE5nrm9nEjllGmHmAOL4u2xN+c0Yq4UIorGKhlgmWhYPEHO7doKUyz9G2ZcwkJqYxkR3yPvF971McP79MT596/ufcUmRjYBCKK369rpEj/LnTAa+fyge1mBLx6HP0CHNYwgPvlUwY1eV00mzekISOv1fUaanWk7paIKgxVIH19lXauLndae4A== 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)(366004)(346002)(396003)(39860400002)(136003)(376002)(230922051799003)(186009)(451199024)(64100799003)(1800799009)(83380400001)(26005)(82960400001)(2616005)(44832011)(6512007)(38100700002)(6506007)(31686004)(478600001)(66476007)(6666004)(110136005)(66946007)(54906003)(316002)(66556008)(36756003)(41300700001)(2906002)(4326008)(6486002)(8676002)(8936002)(5660300002)(7416002)(86362001)(31696002)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yW224IlGoMLad9HXd41EoucMEbrr?= =?utf-8?q?r7Eyj/sodZlPsbi2BCq3XOBg2MhteWkez5FHIBzTZplwp0/lQNf1oMDVjqssspa0K?= =?utf-8?q?Rg/NxxoPrNVk88VukwgnqLHAcj38kIDl1AgbTJimqTAobhUZZmOwo86UjBmk4FzGH?= =?utf-8?q?SCiUMNnoMYxRokFtj4miyMSLGrwALCYJwV/14Pyyn4toVDojwZBdCnRIX+cjnyZRn?= =?utf-8?q?KpshXQRt/Xl95rZZIg5aGhUlYlJ+ECnhwO2Vp/JbX+uGk0P1Pif0coW8VcANa4jPZ?= =?utf-8?q?mAc2doj9p15syxEDTbW34FLPxZNj/8vB/yMr9tjQnxCjigaX06Q+xbRcUYSRSWPUI?= =?utf-8?q?5mnCKzGdRmgaKV6sI2QgDMmcmhDDA3c9d+FJCrjhUZ2+jSKtE9T8lEON8AZpGyKAl?= =?utf-8?q?qHeapbN1UtykD+B+wztv7cvhUR+pCUgt9bDbd2IYXvJrx350O5cIkjcqopatbczR7?= =?utf-8?q?oFTPO1NkmHWXTkS1Z5X6KqyZtj554e1iYxwq+PHSKf1Fz2fkCuCMxLfhYHv7E5097?= =?utf-8?q?aT5twkYgcUaJSh5WXel90qVtklOLGYCmq+UU2xfSJ4pYHdPVqZbVbNJ2T5IBFk4NC?= =?utf-8?q?YbONwyEb/YNB6T4xyj0uuiwMa/S5Z4u9NC6WfR2Xobd1slFzE+BMTJzKOX+xykbdH?= =?utf-8?q?Dh8ht+o7ANBFQ0pgNlzfPauv14vouod/K4s9U5xisyJ+q8UegJWni4t7sbKmG+FZ9?= =?utf-8?q?974Lw0/A/uJwy7ZzT8v7dEYEVNyoxtkjd3nQ2QSlKWC2r9R6gxMoiNab6foNpygpk?= =?utf-8?q?L6EcknMYIx3phRT9jsKVSgtz4kUf+DJzC6WYCC7h0VLv83FJPrbejcM1QxmuVIxL7?= =?utf-8?q?BdbrPH4bHfb/9Jr9fQtf7+sT8zB9zMm4RDDsy66esOOqWT05f3GFl030UJhgSsip7?= =?utf-8?q?o1exegpSvydGH122qZVaXO+oc3QGct07Qg9Xoi3wUmgEtse47wIk2T0bFQBO2Gnc1?= =?utf-8?q?SKjheO3/EPjSNHPKPJJz4ri2jS7UhhxdjRH+SQxupkNnNsFI1Unqd7ssS1ulAc2Pj?= =?utf-8?q?qrFxhF5egL2ratwIn2T2i+r58fThGi/RXTFlUxf98Ook40gI4GG5a8hFtkVvfjbuh?= =?utf-8?q?edLzoXPrG1/hBcPgmbr0WGJfHx58AANfVWTK1rZFQyEtKcx0tKrN0k31gR3dqVuWs?= =?utf-8?q?bPWWjzy3u8n8fAaGXLyEOqDuPvzkUYVseNL6Y74VEB5VdSncQrsVpCaioz7c3+jhO?= =?utf-8?q?dU/KPY2s5uj4d6iGcegGx7V0d3zVhbAmprYbSNFYse9FlUjVhsEvnGyEbMxAG5n/o?= =?utf-8?q?N9m3YnEMsUVVEkUBljFYHQ9iycGdI6DEj66sBQNIn2fg3zSmldq/gvPTNCT30QrF1?= =?utf-8?q?baHJpOyz1DTiLZK42/CImE0DORDDuAvjO1dvHX1ve4tIFaz5IHnMKhB32Wj/du/aO?= =?utf-8?q?wUzlJZGrd5J73LpcSwE/mBopWN3xOHuEt1vl7a73eps9lnwJ9pGMbO1Lhzcw2X6OP?= =?utf-8?q?pPiU7oeTg0lkICcacEqgOcQ1a3kDyS2Pys9zRgCXUpgBl+pzH+Tw+wWlPvn8KGcIM?= =?utf-8?q?ff7PMy7fq7wDJ/PcmWJFeXWD69IDJC0KQQ=3D=3D?= X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3086af3e-d324-470a-e115-08dbe207f1ab X-MS-Exchange-CrossTenant-AuthSource: AS4PR10MB6181.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Nov 2023 16:13:15.2140 (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: V8SpgSr3WDjhGQjGK4y3hvv6z+G7rFrZGU2qBtAnLE/ngx2byRhQeqxFDdESBb8QiA6WG2No1O2Zpw4ggnG1hA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR10MB7970 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: <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 (agentk.vger.email [0.0.0.0]); Fri, 10 Nov 2023 10:14:37 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1782201909978249679 X-GMAIL-MSGID: 1782201909978249679 |
Series |
[net,v3] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region
|
|
Commit Message
Jan Kiszka
Nov. 10, 2023, 4:13 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com> 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 <jan.kiszka@siemens.com> Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> --- Changes in v3: - no functional ones - added original author in CC with new address Changes in v2: - add proper tags drivers/net/ethernet/ti/icssg/icssg_prueth.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 10/11/2023 18:13, Jan Kiszka wrote: > From: Jan Kiszka <jan.kiszka@siemens.com> > > 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 <jan.kiszka@siemens.com> > Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> Reviewed-by: Roger Quadros <rogerq@kernel.org>
Hello: This patch was applied to netdev/net.git (main) by David S. Miller <davem@davemloft.net>: On Fri, 10 Nov 2023 17:13:08 +0100 you wrote: > From: Jan Kiszka <jan.kiszka@siemens.com> > > 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 <jan.kiszka@siemens.com> > Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com> > > [...] Here is the summary with links: - [net,v3] net: ti: icssg-prueth: Fix error cleanup on failing pruss_request_mem_region https://git.kernel.org/netdev/net/c/2bd5b559a1f3 You are awesome, thank you!
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c index 3abbeba26f1b..411898a4f38c 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: