Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4876675pjb; Mon, 27 Jul 2020 07:23:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxbeNpZswRKlERqKQZ2r0sFRyTX5zy3KSIRKd7uya//28w6G7qafSEl8wNcQB15CZP4SlFY X-Received: by 2002:aa7:da89:: with SMTP id q9mr21880117eds.273.1595859820295; Mon, 27 Jul 2020 07:23:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859820; cv=none; d=google.com; s=arc-20160816; b=KsnP+eRAplBDN7OIBMbbFLFXksJ5m3ZxV9C4vqSeXjQu7OlwD0GDZl15aX81DwHnSN zdTNK7dENovlHn2gGfLyOwz1ATCwthrYbwbLXHkXO3rDH9d2okvcI18HJovVIOTH/ohF 78aofSl4W+G72GFHvWxQr/197iePHl9nipEbpNL7UKp3ldboXp+ueO0rKgvqEsAKl+Ed upKS+sl6FOx1hjf+u4nH15ZDfruJmsgeoygxdXgo+NRv0nvmpbEDzbPuzUmzUNABF37b SYLRyj0CKrI4i6MIWVBNQZ7AGCwV12WIirAFQ1UIul6NCG6p1cSIA2gZ/FofM6i0ieDI EdhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7dHlSvpHCWqfEra+76vxYfeq+QXDiifHJDopqlIbE2c=; b=uT6q3oMRcAu479pbnKZVoRXLlcQX8WC+C6P8jhqcPL1Lo7hPkeB4TMUmn/vmlQl+SB YGypw+BY6yNX/D8P1MNGMZWvNNcuCC+Eswnfb3+uYqrSc7STXM20x/FrfY3DTwGOXUp+ Ll1ypHo1ay8Uu+OsfJWCbXM+JAyUIW/IFLgrqYfrzpYgxY+mICNooGyptYRj2BdlwUxD mAHBxNg8Q8mKQ+EPZ0b0RyNVPE/arsqHBopEprcZoCEv56cYspuhQ4PbJSWUCM09VA0v 9ouyuotE7jgbtBB0lW5cz7zo3QcmMiMxkUx2jYLD/hLSMRtj5N4O4gcrkyH1o5F2LElU JnYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lj55AR01; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r7si3774687edw.560.2020.07.27.07.23.17; Mon, 27 Jul 2020 07:23:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Lj55AR01; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731790AbgG0OV4 (ORCPT + 99 others); Mon, 27 Jul 2020 10:21:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:50666 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731805AbgG0OVy (ORCPT ); Mon, 27 Jul 2020 10:21:54 -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 9F6312173E; Mon, 27 Jul 2020 14:21:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859714; bh=x1iHGR1Nyu/ytLSpApmQTR1QQy7zYGQSZKRX+Z63DBY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lj55AR01ARhDnwBd6aP2Egi+RXCo4Lqn96vb3RcUO9EQRtzVWQ6WW+Uj7xc5H926t 3KW+G8beg3y2ItV1ViSeirbAsID/84sSug8KecurQn8PBht/ROYOVk9FqNtX01hkfI wsPCTwx0a9CrLPWJYIfOasQvlT77XOcbjnz0r8Dg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Huang Guobin , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 076/179] net: ag71xx: add missed clk_disable_unprepare in error path of probe Date: Mon, 27 Jul 2020 16:04:11 +0200 Message-Id: <20200727134936.384343052@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134932.659499757@linuxfoundation.org> References: <20200727134932.659499757@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huang Guobin [ Upstream commit befc113c56a76ae7be3986034a0e476d3385e265 ] The ag71xx_mdio_probe() forgets to call clk_disable_unprepare() when of_reset_control_get_exclusive() failed. Add the missed call to fix it. Fixes: d51b6ce441d3 ("net: ethernet: add ag71xx driver") Reported-by: Hulk Robot Signed-off-by: Huang Guobin Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/atheros/ag71xx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/atheros/ag71xx.c b/drivers/net/ethernet/atheros/ag71xx.c index 02b7705393ca7..37a1cf63d9f7b 100644 --- a/drivers/net/ethernet/atheros/ag71xx.c +++ b/drivers/net/ethernet/atheros/ag71xx.c @@ -556,7 +556,8 @@ static int ag71xx_mdio_probe(struct ag71xx *ag) ag->mdio_reset = of_reset_control_get_exclusive(np, "mdio"); if (IS_ERR(ag->mdio_reset)) { netif_err(ag, probe, ndev, "Failed to get reset mdio.\n"); - return PTR_ERR(ag->mdio_reset); + err = PTR_ERR(ag->mdio_reset); + goto mdio_err_put_clk; } mii_bus->name = "ag71xx_mdio"; -- 2.25.1