Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3538416pxj; Mon, 24 May 2021 08:57:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJweulsySXW5ItsPm5EuY00rg11n+GbNgzsw3ZSpX0efnl8KVNCMPcrGCRIFIx0wbhubSBYU X-Received: by 2002:a05:6e02:1046:: with SMTP id p6mr16590541ilj.86.1621871830367; Mon, 24 May 2021 08:57:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621871830; cv=none; d=google.com; s=arc-20160816; b=y6B/eBBfvkveMkEOvh7EJV2+nx23TBtj68NL1Q3rIdSaaePM+InsSmaw3Zx7Uz5jwh EoUS6ItzNJWKRd/HxOFhxybnFChWHF6Y8NdpNbga3mtUfWpW4y4ZU9inQRNtWUm7UxM+ cOS7V16zR2wVcOY45qEXdaZdS3xup0Ne296MfBiwtO/N9sFEfYBe1C6ZDawVG5gEhUnC 2KXhc6hwhXxr6nq44u4Y0HZ6bZNL3pmkikCFMvjM3OIUNlUnpzjKcmsDmXcQPnhObVbW 9sS8Hm9gjWXK8sKLaeDVuxopODfx3KhKToUPqN5FbFqjnNoSXoVyM5XORATDfSBKzwEr f2rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=+/xH6MYINbvTY2puXVBEYFIqXkheka0uURaiG2niwnw=; b=gntAgk8NRgkSfOxxzOm3Jv1lFUI1R7qcZywRSjmveilo8rGoKgXOgJSACLOtkg6Trq TOgE8t+uwB61eEeRAd9RPJa0mcST6IJ1uHbJaazva1dk4eXzNK17W0Y+oeSLj1bZiRKv pW3TRUZMUvtakqY4W0ERgEj6w2BVu0GtI38nIx8JUBK91epPw9z1wJ7OTi/pBtLBGXBa mrUsoxFLbRVlm8rZpTtsiqOwFH9K5vfKgeFVvGuERFDfq7HIeW/yrWxywI5YOn9ar2ei pQW1K85cALQS5QC1GLwq3rvMLe0OEwApTLyvNug3evtjl3iRD1thnf8zT9SQxlsDi9K9 88rA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=u9D9rSOS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w11si16277981ilq.20.2021.05.24.08.56.57; Mon, 24 May 2021 08:57:10 -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=@linuxfoundation.org header.s=korg header.b=u9D9rSOS; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234094AbhEXP4S (ORCPT + 99 others); Mon, 24 May 2021 11:56:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:33978 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234005AbhEXPsb (ORCPT ); Mon, 24 May 2021 11:48:31 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A211261132; Mon, 24 May 2021 15:37:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870656; bh=SDTsVMM6n7bUbaJAOX0jaOO4raenHzv1Vs0yG3dZmhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u9D9rSOSXqKTe+dw6SYnV8zDnIeeAKcIfsqadWD/vts2rxKsnkOzhsf6hrhjtGM+g NaNnT9uQj9hh1L9TFJJmtDHa1YspjSLf5uVPv0slT8XjGP00LmwWX77rJemHI0VPxv Q9H8e5CGdTkGmwdYq7ZJZJKJJjsvfroZctsCAUPg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kangjie Lu , "David S. Miller" Subject: [PATCH 5.4 45/71] Revert "net: stmicro: fix a missing check of clk_prepare" Date: Mon, 24 May 2021 17:25:51 +0200 Message-Id: <20210524152327.929608337@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152326.447759938@linuxfoundation.org> References: <20210524152326.447759938@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Greg Kroah-Hartman commit bee1b0511844c8c79fccf1f2b13472393b6b91f7 upstream. This reverts commit f86a3b83833e7cfe558ca4d70b64ebc48903efec. Because of recent interactions with developers from @umn.edu, all commits from them have been recently re-reviewed to ensure if they were correct or not. Upon review, this commit was found to be incorrect for the reasons below, so it must be reverted. It will be fixed up "correctly" in a later kernel change. The original commit causes a memory leak when it is trying to claim it is properly handling errors. Revert this change and fix it up properly in a follow-on commit. Cc: Kangjie Lu Cc: David S. Miller Fixes: f86a3b83833e ("net: stmicro: fix a missing check of clk_prepare") Cc: stable Link: https://lore.kernel.org/r/20210503115736.2104747-21-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c @@ -50,9 +50,7 @@ static int sun7i_gmac_init(struct platfo gmac->clk_enabled = 1; } else { clk_set_rate(gmac->tx_clk, SUN7I_GMAC_MII_RATE); - ret = clk_prepare(gmac->tx_clk); - if (ret) - return ret; + clk_prepare(gmac->tx_clk); } return 0;