Received: by 10.192.165.148 with SMTP id m20csp3978194imm; Tue, 8 May 2018 00:21:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrdr0G+NrOowLiES3ta9lerZxc4m3UsyCFt4tNDMlONcoup7ieZwTj1So///9bvoZppdcjq X-Received: by 2002:a63:7253:: with SMTP id c19-v6mr32000733pgn.425.1525764099153; Tue, 08 May 2018 00:21:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525764099; cv=none; d=google.com; s=arc-20160816; b=vzuhdbD61/1ces1JRdi1KuwO3hokpFvSTnVfEV1V0GMYa3URtOzqRJ6pjxNtt38ln5 IbwR/EPc9lWQt15FIaBxvFFabqzRDW8+58bAqoL2+1eqCCmcpcBUz0Hifay6T5Z6haZ+ HcAdmEUKfPE8kgaSSnwPX6u4qcY2dOreSeHPeuQlA2i++cRoDHx7bNOGwFCHft3wd71B AhWdnItbPn1ZFv7gHDujB83PnSK1cohUSLlsBuZiPplkicRwrb7N/6bJRTRqpo73IwkQ +euEjOoom/62Mnpv+rARDWaAv30ZwssUBN2HTEZ8c6dLp3j5yBzMdxzQ89wI/8hR+9lG LHVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=VMiLPJXMb2D0EA3CMa1o5Xv1TI7FxjmW+yApUsvf+PQ=; b=WV0PmaLTxrfbEnm5xgsVLI/vvobBtb8gbKitbQ1PVru1qn6PGfj737oyysFSW+jWky ywwiEV1R5Wnot4VVE6Dk6LSuB9ahLZ/W3UNO/RuEUSsS4WP89RS5CpOUlXCSMxkWE1VR HvJ0JapUBGWy/v6r7u8BjboFJY7ODPVKR16c9/tDZsHxhI8UVlTfiy34WEoZlkLygRZz cATO2HThgrsvDp1D6DZug+7eX7iUdRvzW9tL25D5emJ7uCFpRwIS0GbfRZomV0PWmnHs Q3fmBj3mRL8LJ9LQ53oxTnHoFuUIFDuALZayvPq/hHe3mfS7OWoDnMqLUtA9M8R+2IFX WPNQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@AQUANTIA1COM.onmicrosoft.com header.s=selector1-aquantia-com header.b=LujhwCHH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4-v6si23934255plb.522.2018.05.08.00.21.24; Tue, 08 May 2018 00:21:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@AQUANTIA1COM.onmicrosoft.com header.s=selector1-aquantia-com header.b=LujhwCHH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754691AbeEHHTd (ORCPT + 99 others); Tue, 8 May 2018 03:19:33 -0400 Received: from mail-co1nam03on0048.outbound.protection.outlook.com ([104.47.40.48]:27655 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754123AbeEHHTa (ORCPT ); Tue, 8 May 2018 03:19:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=VMiLPJXMb2D0EA3CMa1o5Xv1TI7FxjmW+yApUsvf+PQ=; b=LujhwCHH51ZkFDgYsFMNT7MYpbgYCFuSEaAeM1CvQy8lYGkGn8XAeT6b28seyT5a9TQQvqQdop2kpHPmMnTCj7b/F2oFkWduYCRMOK8ewDPVtzSqefZ3EiUb98CMiukB2vX5cC0b8IqDUQldQ+op6EHMjuBsdurFtgRgj4QldPk= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; Received: from [10.0.3.15] (95.79.108.179) by CY1PR0701MB1663.namprd07.prod.outlook.com (2a01:111:e400:5289::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.735.18; Tue, 8 May 2018 07:19:25 +0000 Subject: Re: [PATCH] net: aquantia: Fix an error handling path in 'aq_pci_probe()' To: Christophe JAILLET , davem@davemloft.net, pavel.belous@aquantia.com, weiyongjun1@huawei.com, dan.carpenter@oracle.com Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <20180508063947.11317-1-christophe.jaillet@wanadoo.fr> From: Igor Russkikh Message-ID: Date: Tue, 8 May 2018 10:19:14 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180508063947.11317-1-christophe.jaillet@wanadoo.fr> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [95.79.108.179] X-ClientProxiedBy: AM5PR0102CA0019.eurprd01.prod.exchangelabs.com (2603:10a6:206::32) To CY1PR0701MB1663.namprd07.prod.outlook.com (2a01:111:e400:5289::21) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:CY1PR0701MB1663; X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1663;3:848QoR4/9ms1cYN4D9tukMFA8NmHCNRtn4mjhlD4SDY0t5jwOeByppnuPS1xLZ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7wHgS8MAbnYFh78Bf64qBdNQuHNuAASBAAtGdKhGb0ICNwXgT/OBoSDMuRdKHgZXJ7/T1F5C4qWdB6sZLk7LB+Mm3D2G7ywDAh2c+i9u5Tdu/QN6nXIscTfs4gOF863YxepBUEx+hfXKnYL1EbgGVZbg2o6EJQ3b6zGlGELYWrLM0MwNR1ueRh6Yos+5sNj9DZgdo762imbkn1sR++JqMrE6XYMuP6Jq8XK2sEpJspguD2h9O9biDD1uUNfplsH8+xoFanWBLrgvQPbL5NcCrZnYan3wF;4:cOJcZKH9rKcgeKuFg63uQoo2hc1T4cO7wvFmxiNuHmeSAN9mpLhqvrHn6eNtu+lc1Snh8kkyRGuUXRqQ0jRGAvjFiOBZ2hzlFwsoZoChsNCQTt8IxjdQaF/Y5WKhZOpZ/qvWdojc+TKJNHsAMCFHSUU14gEA9PyyXxQY/RKtQPray3YSyDm1xxZf3l1oI+r0n+ngzRNvdzQBb2sl4LTP8nQn6Baj3KqdmJVc8UEsR8NxGDgb7cy4g4pZN+qMfKpz4df8TZv6hEzMstnhPHlF2A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(3231254)(944501410)(52105095)(93006095)(93001095)(149027)(150027)(6041310)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:CY1PR0701MB1663;BCL:0;PCL:0;RULEID:;SRVR:CY1PR0701MB1663; X-Forefront-PRVS: 0666E15D35 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(366004)(39840400004)(346002)(39380400002)(376002)(396003)(199004)(189003)(68736007)(23676004)(305945005)(2486003)(229853002)(65806001)(2906002)(65956001)(66066001)(186003)(4326008)(26005)(97736004)(47776003)(64126003)(77096007)(386003)(59450400001)(16526019)(76176011)(52116002)(53546011)(6306002)(31686004)(58126008)(6666003)(16576012)(6246003)(316002)(53936002)(52146003)(6486002)(36756003)(8676002)(478600001)(7736002)(65826007)(966005)(50466002)(105586002)(6116002)(31696002)(230700001)(44832011)(446003)(486006)(5660300001)(106356001)(25786009)(86362001)(11346002)(956004)(2616005)(81156014)(476003)(81166006)(72206003)(3846002)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR0701MB1663;H:[10.0.3.15];FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTFQUjA3MDFNQjE2NjM7MjM6TGZnNnNWMy9kRzZVazB3MkVScys0Mk1j?= =?utf-8?B?UzA5ZitoWHdpS2pIaTA4NUJHQXIvWGpNU2xHTzlGd05XaUpPdENLcXcrRjQw?= =?utf-8?B?N1d6S29Za3hscm1GdU04alJTbWY4ZnJteit6WkJXVGQ2cVJ1Rkl1eG5FMWlI?= =?utf-8?B?b2w1dG5NUkpWKzkwdWlBaUlTbFJQdjJTaTgzOTUvNlA4YlYrZm5Gb1dGNUtp?= =?utf-8?B?S3Nyd1pBVzd1cEYvOGM1eHJLY3dYOHVJN3p1UmtKU0MxNHdnQ1orUXBFRndY?= =?utf-8?B?cytnQmtrSU0yR3hscXAzQmI4Um8wUnhkY3F4UWdrQU5Ec3lmTUZNRVI3d09R?= =?utf-8?B?TnFmQXk2SFo2TTdkRU8xVlpDL1daOEoyM0dLUEpMVGlxS2dWMXB6UklmUEoz?= =?utf-8?B?czc4S3ovNVpNOU5sNHQzNWdseUVGZnEyTkVuaFJ3a1JoQmM0VFBuYlY0NklE?= =?utf-8?B?ZmVmNmhLOW83RmErMnZHbnVQWDQwcHhSc1NWZml2K3lNWEQ4UEo0eXpXM2VN?= =?utf-8?B?U3o1NWJqdyt6UjdDcnpEY3l1dDd1ZGZDd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rzSxhbggMXwHoeYwiZwjbRFZ5mdNc5kG7VWN/I/wHENPCQb9QWhc8zsVoOHmb6dY0f/BkYFcv43WBF4Q0GBBUfVg1HK3cclRywc9k8ylw7kvqrixLe8GnvTChWzFGmae5JuGbYVRsbey8Tktx8+lyaAFmq5Gle0PlWq2EmXErBhR1ndVGzwFvjGtkI6EnqSB//zwmVyGRry7GJmq4e3uswTI2Xtn37IV1k2/qlUCtnuUmGo1UwST7c8DvqEN2fYe59pV85x0ZeukTnoMS42snH8Ie3hGcUodpWkeMFdxudILl6KSSMvIN0H0CC3TVTX92wfoZluLqVWlsx7TdhQy7bzO057WsQCs6+U7tGew12dvBVP9JUVczXcQJYiang==;5:s8s/c51sca9AXeyvK4Ag0vSSEA8c+yngscYhuIaM4Co37+Oe87Tz+KzakxIG5j3x+fTfo3XZ4jJPf466BroOAeLx9xNY6ORDsppXAzyEVOXRbSy4crRVAOgJzfP1NqCfnI8So4Vzpbn6xmp7Cn/T/4SUrixmu9TFbyPYee35Jos=;24:SoYKmTIUCYbahTpzQ7lHC/7PreeyJAxqe2J3AE4yYey4bLz8mCOiHMqBaapewmvoxiebh9Gdds/qLdfXEhHxzgCWFd6sw5YLeHywCxAtBv0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR0701MB1663;7:Wg/LnQBu02B11Kjf2Jl5jcrE3E5rvpZ8VTAfWinAYwzLTSPNFERBF00vgWdlPfZ2n0fXizDSNYoCtHIVbO7vQjvyhWqEYFRs/b0mjqCurSPNyHEaycEMPo0n0Kjy8i03slHVByQNg9JiZFQKhJbTdKm6quo9oy7caegMReMghEdna95kHGg7GquGT877w7Pjum5trCaJ46V/UMKySUNKw8rzS7E0JjO38y90WbzfT9DKLVIVzl9AyvTFSxO42Owx X-MS-Office365-Filtering-Correlation-Id: 0fe26878-6dfa-4f8a-bb1c-08d5b4b408c5 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 May 2018 07:19:25.7550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0fe26878-6dfa-4f8a-bb1c-08d5b4b408c5 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1663 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Christophe, On 08.05.2018 09:39, Christophe JAILLET wrote: > The position of 2 labels should be swapped in order to release resources > in the correct order and avoid leaks. > > kfree(self->aq_hw); > err_ioremap: > free_netdev(ndev); > -err_pci_func: > - pci_release_regions(pdev); > err_ndev: > + pci_release_regions(pdev); > +err_pci_func: > pci_disable_device(pdev); > return err; > } > This was just submitted yesterday and is already accepted in netdev by David: http://patchwork.ozlabs.org/patch/909746/ Thanks! BR, Igor