Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4876344pjb; Mon, 27 Jul 2020 07:23:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx9STNJgLhclwjA/Y63EeeBUqYeQ/W3WwH4agaMBsd5tqZYYdwDJL0Ae2PNOuVHHUABcJv0 X-Received: by 2002:a17:906:4356:: with SMTP id z22mr22041162ejm.414.1595859792255; Mon, 27 Jul 2020 07:23:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859792; cv=none; d=google.com; s=arc-20160816; b=KeKIO8u0GwRxnNr269rfsWEMAp+FpjhUj2BEVmxA/oS59c//e07rZ4txAQxMkbaoqy BZMQnk2/+3pI6jhJEg1N7vqOUpqzQIrZaPQHLkvaGVBK6ZHoRCQXH67NTWpMnIIQrnee zY3qcpcIoMSkvaEjFsspnOIyrv1s3EqV4npXlFtZ9QPtcbqyRQ/t2TDPArO5H14xJ6Od 2nkLv9ISuEfC7Ju6PYdNFl8j13z50PAJIN7vexjjfUQNrnW2LYE6uiKp0UxdfBmHeS71 EXAh48afFdEt85JSJxwpnJzdpUgx0RcjMgJjJ7p5CCOn3CLNGjYnXjqw18P17OsLQ/i9 PCSw== 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=vZ5W7HUC+KEj0bH+iIFT3QNeht3CMCL5Jah8Qhxz0eM=; b=dREprG7hIpaNtNwkwKvToq/eh8jUocEjgMXJcyZVycbhTXT7vYy/aDSKtwmxE0X+cj nQZwjprXvSKaXXjNrdq5pYF6cgwWCR1eYc5dhW/tnZ3BKzPEKxfLeyHigP7UChm32OLq YA1yzkJ2m2gKLLHXlrBKqpNlX0s6lj3c08KI+/zxGdBtRtBpYRxtwQwHDV8ogD1FQjZE IF2f4BoFT3bRjogywCNOsTLwvBD7owHMtVWUy4J3wT01cBytZ758rMMbZ1Uu80Wt7XJz wdI0EudU1L4Lrme9dAFafvoj5HCM/zuNZ9T80hGsr14GbzN+1zmRTTNk9qaGfo1xKx4M fVsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ww5dUR8P; 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 d25si2896647ejc.287.2020.07.27.07.22.50; Mon, 27 Jul 2020 07:23:12 -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=Ww5dUR8P; 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 S1731729AbgG0OVa (ORCPT + 99 others); Mon, 27 Jul 2020 10:21:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:50062 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730258AbgG0OV2 (ORCPT ); Mon, 27 Jul 2020 10:21:28 -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 6A34D2070B; Mon, 27 Jul 2020 14:21:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859688; bh=DafwVra6R15YiKS3P4lQV5RXKI9bC2rto+ReRK0TKTw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ww5dUR8PsFuibZATpuAoG/pTJ9Ys5dS0KwZz6CoXrIJO37x9MtnWuVAddHs6M26z8 1annWHdwTqdapmksBF7+d+WCQVVaFCVh7WLvjyKMLX5QBIINcGbjP7xXzMMbZZ3jXY r/vG2CoCV3JVo/d9fRh8fwVo0DUWVtAmL1qiEhQk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Zhang Changzhong , Doug Berger , Florian fainelli , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 067/179] net: bcmgenet: fix error returns in bcmgenet_probe() Date: Mon, 27 Jul 2020 16:04:02 +0200 Message-Id: <20200727134935.932943126@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: Zhang Changzhong [ Upstream commit 24a63fe6d45d6527db5ab87bcd1da6921f10e89e ] The driver forgets to call clk_disable_unprepare() in error path after a success calling for clk_prepare_enable(). Fix to goto err_clk_disable if clk_prepare_enable() is successful. Fixes: 99d55638d4b0 ("net: bcmgenet: enable NETIF_F_HIGHDMA flag") Signed-off-by: Zhang Changzhong Acked-by: Doug Berger Acked-by: Florian fainelli Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index dde1c23c8e399..7b95bb77ad3bb 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3522,7 +3522,7 @@ static int bcmgenet_probe(struct platform_device *pdev) if (err) err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (err) - goto err; + goto err_clk_disable; /* Mii wait queue */ init_waitqueue_head(&priv->wq); -- 2.25.1