Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3527354pxj; Mon, 24 May 2021 08:41:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBivwV1vwli5zjgGJ+1hSn2D3rJQtrLWU8nQToeY1VwvipYnx7NpCV8tbUC1lsle5BnidM X-Received: by 2002:a17:906:8294:: with SMTP id h20mr14244872ejx.321.1621870905735; Mon, 24 May 2021 08:41:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870905; cv=none; d=google.com; s=arc-20160816; b=vuveMqq1tZhOGk68icvOdTH1QVDqCyN1C5mHV7GUVWvcLQIrss0QfDvXoEyEpUOl2s cFduAr0aAMEUS8lTsqDMiurM+pZpQr5nQd3cQirVZrc9Qxun3XiJNLTGAlgPG4qyBeAi GtiCNFkojIljJtDHaPWMob7UfoEVg+/C4JdCpCKWD8r09uCIy8yvMzvsDqsp2WYxQBi8 Qhm+gH51A9GdVQqjijKr0AIey2qyLvrrBkxpe/kRL842qs3CR+ZEz2Bt//P/Ylbrv2vM 4parr8CFd9cMT7mK/K8T00LzwSLFPDUy7uEnBve1xngahvz7cLKg6mec580byVUV/Eyx XUxQ== 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=ccjtyRRzKyCbiUlyTd3V5fJypixJRqZHfAFUlI9jvig=; b=qckfdrx+7LBEM7V1QIioyT+mPL4HiGsGWMJNyAaICC9+YnC4nTyT5pFGJ4wyom870v pL1ncD/8QnhZOhL+BKEGyd5MLHCH3r6MfVTkmj6+NSWw9O4OfBXa+GmO8RJakxf+nI41 RDNFQ+PuqVT9RrcDOdxIFcaSACy5B7l27MO6dcLypP0CvblHIYMqhhN8/eZL7WGXaMuJ m4QeXtWqAuXcOE99EAaUVK97kB3D8m5atkX+Wp3tkSr4BUCBPug2Kq53ho4jebVJVh9a dkPWKoAi08usvGvvXU3wHzpgyp+w+4vmTYLW+StMC3NDaxMS16nFdIbsOko8C3T0oXcH m6og== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iR7MsYy7; 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 yh21si17728936ejb.150.2021.05.24.08.41.23; Mon, 24 May 2021 08:41:45 -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=iR7MsYy7; 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 S233412AbhEXPmB (ORCPT + 99 others); Mon, 24 May 2021 11:42:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:56192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233854AbhEXPiT (ORCPT ); Mon, 24 May 2021 11:38:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id BF17D61421; Mon, 24 May 2021 15:33:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870401; bh=3iOAUpIunq8o5uXAQzDcoek9kBPjKvTpZGYDo5alVaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iR7MsYy7idZxIJjwfcNc5P99cqU97Sv+6EpB9mLdTAYHGMOiexTXl8qScS1jx1mim yOYfEIsKZOL7pxagydiOFag/xq2xicaah1aUc7faQ6eTSvLpw0MgvTpuVz14Q5SZ/U G2yIP3mkfLTJA6PSbX0Wr7VZeIDbAi5Ub2EOtp68= 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 4.14 17/37] Revert "net: stmicro: fix a missing check of clk_prepare" Date: Mon, 24 May 2021 17:25:21 +0200 Message-Id: <20210524152324.770843178@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.199089755@linuxfoundation.org> References: <20210524152324.199089755@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 @@ -59,9 +59,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;