Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756148AbcDGLvT (ORCPT ); Thu, 7 Apr 2016 07:51:19 -0400 Received: from mail-bl2on0061.outbound.protection.outlook.com ([65.55.169.61]:36192 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755526AbcDGLu4 (ORCPT ); Thu, 7 Apr 2016 07:50:56 -0400 X-Greylist: delayed 1982 seconds by postgrey-1.27 at vger.kernel.org; Thu, 07 Apr 2016 07:50:56 EDT Authentication-Results: spf=pass (sender IP is 137.71.25.55) smtp.mailfrom=analog.com; pengutronix.de; dkim=none (message not signed) header.d=none;pengutronix.de; dmarc=bestguesspass action=none header.from=analog.com; Reply-To: Subject: Re: [PATCH] ieee802154/adf7242: fix memory leak of firmware References: <1460027764-27428-1-git-send-email-sudipm.mukherjee@gmail.com> To: Sudip Mukherjee , Alexander Aring CC: , , From: Michael Hennerich Organization: Analog Devices Inc. Message-ID: <57064005.2040801@analog.com> Date: Thu, 7 Apr 2016 13:09:57 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <1460027764-27428-1-git-send-email-sudipm.mukherjee@gmail.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:137.71.25.55;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(24454002)(377454003)(199003)(65956001)(2950100001)(47776003)(11100500001)(586003)(50466002)(117636001)(4001350100001)(77096005)(230700001)(65806001)(3450700001)(19580395003)(19580405001)(2906002)(1096002)(83506001)(36756003)(4326007)(5001770100001)(6806005)(53806999)(106466001)(122286003)(87266999)(76176999)(5008740100001)(43066003)(86362001)(54356999)(50986999)(5001970100001)(1220700001)(189998001)(65816999)(62816006);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB1245;H:nwd2mta1.analog.com;FPR:;SPF:Pass;MLV:sfv;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD024;1:Kdvth+U1QXvkqd/zxrphyFw5iXyNpnMfhPMcUMAEx0vhFWjB3ES3+yxqW13LJKEnp7CbaYG8sG5BPXrFQ6HbhRuQ7fFBvZhVUANuC0BjRsX7aUXC+1sPn3iLUgIMceVWKaboQ4a7VqeCuNLFA4e41WB7nIyx5JvGap5kK77jva8ncEiu5ULopbrLYxEWm/Zm/AgygAElzu+sFTgHy64OZWZ+qqDL0DIew+W6/bJoJty1JcmQyWvkyLpvSdxPBOmBhQj6+Hab0HTusET9pgnQFkrhe2Zj0ML8z3X7GuWFD2NsV/GgHZFaCZX2H1DEWbbYX1UMnNVs94vVSa9X6f5x+Vi3P8Yc9nWaEGck4g/UAc+ItUZMc5pYbawHgxILsH4DIuRB47q2kHtdIi4LJBG1ibeC0Aw0HjGfxMeooUYxjqCHnOczIN9k0s34IU8g5ygMalVGwnjjrtk63ROSL4UZRHIxpcrI1PoKT+umvb0eDZXntzE/i933BEKBAu5BB8LUqyX7jXwT15ewhs49YxA4clN8ofRGXkcwz5BCcvsWO8iUuqfrSAlS8BoIalTNcs2U X-MS-Office365-Filtering-Correlation-Id: 6944812d-3d12-4600-1490-08d35ed63fe1 X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1245;2:XlzC2Bas+nLbj9BUyFaYvt407MU37BW1MoVFBi+Wxh7KXA4waYApKTQxtT5unXiFhNa8fLHP7fz7iHbHVgqB8hfy9Yt6AS1iG4oM+6Tr1wJI8Gjilk34yPfXw9/S5zyPXJXmFV0gycs9P12O8K7gclOjaxO+AR95/HXlFuCYTh7lCrsKQmnSleTk53vXeoya;3:fv9mcc7okX0TX0Gche7AT3zyDynRJy4V64WjlArzXldy3qYxn1/MihjFQxsbir637VbWymH+ZrZrD6DfjB87ID9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7KTnhWfPS1PlOlJbDLx5AKh/cmplOm+R0Vzrxaegg5szzgjoQsWHs/42 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(2401047)(13024025)(5005006)(8121501046)(13023025)(13018025)(13017025)(13015025)(3002001)(10201501046)(6055026);SRVR:DM2PR0301MB1245;BCL:0;PCL:0;RULEID:;SRVR:DM2PR0301MB1245; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1245;4:SQmnIp0DhsEAw9vZyRyeEyCCf0HIeiAa7fNNur2JH9Cm0SAAcpekNCJKiAMruYazan+GIseCyhpo3dqa8FHmyyJraRmGItGsH8nKCctHaoFPGTaqDyuMcKxqnC70z6BcGq2DBzgHuvOWFXiDwZklcg4HtqeclzZRQE+lGP+E045k1LOjQ5CK1o1xpsIg5G4xU5Cb0XPhqWuKgcHB2zItdKbvRtNg6IQditpWpSiDiC8m/g7d64YtRsIYHLRQBMAQrH/z87IS0xgUtBj3WigfDquZPGHK9id4j+/LH+2Un87RjVqeCLB/F3mWmxVhhT9s36XFKVQO7F3nr/l9C3ZZ9RgyQzXoy28u6lwYzG3zmeHKdcBSgKQPiaoyqtrwBs/fqsaNsMtanxA3CP2ADIhoC4fNXkcWDCwOS9O/xIn4fw+iqPPYpyzx0ncYLc+yoI/Yc+LEhN+4OlgDWSRlwktqATakoSgHCuFip1C8x2etkR8= X-Forefront-PRVS: 0905A6B2C7 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1;DM2PR0301MB1245;23:iZPHswKojP7qO2X6nDOglrKp91So7gbiP9J?= =?Windows-1252?Q?3pak5GC4ihKLDUJgxBpUSMXz1M5z0jgv4jxx8iPUi6JJdh99E6IxpnHc?= =?Windows-1252?Q?1yvqwGDsluerSHmMB17zqxNWoGiNflMTcxOCEHJg4PX4K7riVdHCzyUk?= =?Windows-1252?Q?jVWiO2lcNODS6hjpUh26fWZTApxyZmBuUPcUhUoLNFyZuCaJWZAPreZL?= =?Windows-1252?Q?AgG01A1TT6bJOUzZEhrkiMLjCiJkGhgQ03n2HfDDV8epZwrz55fiKodA?= =?Windows-1252?Q?qu3VCcznx6v2gAox2xmTskZByab/HFWMUisFS+LVVNl/E8pxd1bEvRNr?= =?Windows-1252?Q?FgLAwXvYjaaXLl5SYH96Wgf9BeChgilWJX7pEr/4XgtHODSDc2jn6Omg?= =?Windows-1252?Q?Tq2yr8qv5LuYt2GMfOTdTluTuc8sxl9UD6pzosWWJWHoMJ+w+DmjwxFH?= =?Windows-1252?Q?dVvrcS4wbugLG22j4kwT9RW+T+K25c3B46yP6lSR30fAu9cXdaofwfXU?= =?Windows-1252?Q?mhKFS1eMxc6n5vAjdEh1asaZNjLDPavsOy8tgO/HHeNCJltTCvj+Ea2q?= =?Windows-1252?Q?Tp4bxlKmNT4GyKmhYaTdaXqP9gARxaM8J1O/qmE9DgwarUR8T/JEuOi5?= =?Windows-1252?Q?wskceMHFiEJjE2+eJm4/whwtt/u/Ngymeg6LeJHrQPi32VtDw6RmdU1s?= =?Windows-1252?Q?iwPJQp0sZdLe+22eLkhuolb7oebZYXmiKEthplh3lp0SrTaw4JME/GDz?= =?Windows-1252?Q?gYif+Nl9GxFZeV3xGuoTv1TI5DnaTDxA0crZm1vz19S4bMqgBS1vt7bA?= =?Windows-1252?Q?3CLxqTQd6artm7EoZdDNo0WhdHbnZLGEUys3CbFfHiGt8OjjuSGfJXHw?= =?Windows-1252?Q?RzxNX+HYsMC3R9Ms/ZJ7Xd9URJeEcBickAgfWcggmInmoI/CNCD7ozst?= =?Windows-1252?Q?Ci5+O6/tFqyI7VHK46TtfEu4WIWJzG0uKOxSZsKZCVFwuDAPmOt3mGR9?= =?Windows-1252?Q?J/x+Qpo4YVzNVOBzXibu4ODi5pRI7nrDKd34bC2kFTSDNbsRrnj+VzxD?= =?Windows-1252?Q?zLuVIhd/o8IKaTFkqMPnHTjaj0DZGUyH57rOe4WIACCagj0tNYqfaI63?= =?Windows-1252?Q?clXq0mWvh2PSNLvU0HX+WZfWZJtx2bTa0GP20WCNpFJulWHJCDq/lTjB?= =?Windows-1252?Q?OuTkt0Mxwocx7IsXPjVsAQGmwvkzOO/38XLkSGa/2Jrj1qs1z6SwD?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB1245;5:0B+LCWtmu1BZIuYximdaAaz+8p7W2i+oTQ5odU0Ek51wQus5aIRzPcc1+iCga0x5A8TKd5xabCnzMOw49LlWnvTulLGERhubW019xIXZtIsUtpOb1CesfH78r423xQNvzvm2U3983jvaogEGMOSN8w==;24:PDHBxJTePwH/R6mpeAA9Nj8GesRTbijnfv+pyMahv7OOCI4lvq/sVTad2jRsvsLETHwqh6suoeiRPRGCp6actmE5/GF7d5Li3EXduHP5Yaw= SpamDiagnosticOutput: 1:23 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: analog.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2016 11:17:47.6163 (UTC) X-MS-Exchange-CrossTenant-Id: eaa689b4-8f87-40e0-9c6f-7228de4d754a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=eaa689b4-8f87-40e0-9c6f-7228de4d754a;Ip=[137.71.25.55];Helo=[nwd2mta1.analog.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB1245 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1316 Lines: 45 On 04/07/2016 01:16 PM, Sudip Mukherjee wrote: > If the firmware upload or the firmware verification fails then we > printed the error message and exited but we missed releasing the > firmware. > > Signed-off-by: Sudip Mukherjee Acked-by: Michael Hennerich > --- > drivers/net/ieee802154/adf7242.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c > index 89154c0..91d4531 100644 > --- a/drivers/net/ieee802154/adf7242.c > +++ b/drivers/net/ieee802154/adf7242.c > @@ -1030,6 +1030,7 @@ static int adf7242_hw_init(struct adf7242_local *lp) > if (ret) { > dev_err(&lp->spi->dev, > "upload firmware failed with %d\n", ret); > + release_firmware(fw); > return ret; > } > > @@ -1037,6 +1038,7 @@ static int adf7242_hw_init(struct adf7242_local *lp) > if (ret) { > dev_err(&lp->spi->dev, > "verify firmware failed with %d\n", ret); > + release_firmware(fw); > return ret; > } > > -- Greetings, Michael -- Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368; Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif