From patchwork Wed May 13 09:44:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 225998 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC8EEC2D0FA for ; Wed, 13 May 2020 09:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AE87120643 for ; Wed, 13 May 2020 09:53:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363616; bh=3RblSuSHb5U89WwAV59h/TSflXzIDVmXUYRrc3Iy2ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=n3UaVLh26IhCIYHvqufhcfCrsAzydGGG+Rj6a56us3h+dx/St2Bzm8fSl2QpTDsJL RRfV7XMUE+VCu19YeGIEQykgcFLWu5I5FLbr7CCucIog5NKXbGYjLqtRI+ASQaWa4j pUBYwN4W9HOnGPLxQzaAKtepDkF7GhqjURzJ2Ohg= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387976AbgEMJxf (ORCPT ); Wed, 13 May 2020 05:53:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:55630 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387972AbgEMJxe (ORCPT ); Wed, 13 May 2020 05:53:34 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C751C205ED; Wed, 13 May 2020 09:53:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589363614; bh=3RblSuSHb5U89WwAV59h/TSflXzIDVmXUYRrc3Iy2ug=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bwHO9y/kUno75JX5SjIW4gJGjhwOVsZT2Yqwrp3HojWQecxzIAfSXDiiTvMUqVmyS TQ+ZQIDBK7iqy64asIsrHTkwyuNm7g1bzBfdOIGqlUAYpxDlTer7D31d+LgUMmDSWk V1u0G7SQYBMPZu6Ol/ew4lKnKw5IkdAMyfdNbC4U= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Dejin Zheng , Vladimir Oltean , "David S. Miller" Subject: [PATCH 5.6 054/118] net: enetc: fix an issue about leak system resources Date: Wed, 13 May 2020 11:44:33 +0200 Message-Id: <20200513094421.808935767@linuxfoundation.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200513094417.618129545@linuxfoundation.org> References: <20200513094417.618129545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Dejin Zheng [ Upstream commit d975cb7ea915e64a3ebcfef8a33051f3e6bf22a8 ] the related system resources were not released when enetc_hw_alloc() return error in the enetc_pci_mdio_probe(), add iounmap() for error handling label "err_hw_alloc" to fix it. Fixes: 6517798dd3432a ("enetc: Make MDIO accessors more generic and export to include/linux/fsl") Cc: Andy Shevchenko Signed-off-by: Dejin Zheng Reviewed-by: Vladimir Oltean Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pci_mdio.c @@ -74,8 +74,8 @@ err_pci_mem_reg: pci_disable_device(pdev); err_pci_enable: err_mdiobus_alloc: - iounmap(port_regs); err_hw_alloc: + iounmap(port_regs); err_ioremap: return err; }