Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3541917pxj; Mon, 24 May 2021 09:01:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLFI5YZWhBLqU99GeA5EXPvz4kESEK0K6D7t9m6MnWy92OHmLYIk5XGYCWKJslYranyjGi X-Received: by 2002:a92:cf0f:: with SMTP id c15mr15911564ilo.288.1621872082630; Mon, 24 May 2021 09:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621872082; cv=none; d=google.com; s=arc-20160816; b=i++XxfMP89CyXEO0LkiADD4E7efsqr4d+5SFnGy8drRegS/u3y+mMRv1QysLLVBVI9 YAXOTVF7XPzvd0JYww5Om/iSfQ+B/rlZO3cy9lrK++baUoNOQU5r/UrU8OgyaD25N4Fy A2j7glyXtpL3n78j0EEfjUH/+cYY6Dg3d+ElwyI4riAj8+AjD6olV8T3hdFkGdDwClWJ RWY1a2LkF5ptWUjA5+1RMbAqVxN6QGUL28TbcC17XaySp8a0XkZ9HEaDbMy2DYJs8xnn UIajMoK/VozaKCIWuQytAf1YuB1NfXG134M3dSsq3Vrqk9TuOo/rNgL5E1xa2Q3MuXZl Jbsw== 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=PMoAkNHAj60mltMzKPh5C6GVTlxCayp1ZLTs+QP3YHG/gg2i3WYOaRuZ8pxOKf6N1p qYtZZy0wMVjfeESDs0mf5iXORatIHLoPaXhLt957oTTxitAqwwuFh8L2WhW+I56oY6q4 oE0y42RWRcqSI8UTG2Zm334lFTZJszlfaJ6G7fdvvOw/VNv4+QJYj0+I6gaRrkcO+a5C N/NEqxiTzDsMHe6pKNveLjO0iYH0IyYq60uDe8vVppSV6c62uyKf2LfduTzaPDSOzLHg mrjVF1tzKXaNRCplRpImTFtkC/qzpE31olg6xaHEEZzFokmdZH16OuFYAwqDgem2oiKm D4AQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=HUPSCgX5; 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 c7si13826251jap.0.2021.05.24.09.01.09; Mon, 24 May 2021 09:01:22 -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=HUPSCgX5; 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 S235662AbhEXQAu (ORCPT + 99 others); Mon, 24 May 2021 12:00:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:40506 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235400AbhEXPzH (ORCPT ); Mon, 24 May 2021 11:55:07 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 9238A61932; Mon, 24 May 2021 15:41:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870875; bh=SDTsVMM6n7bUbaJAOX0jaOO4raenHzv1Vs0yG3dZmhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HUPSCgX5c9BL/qqHJn9KJftKX1imDzaBp24sLbINXNDSinXNH+r47qAmc2q8ziDIW D347K65ja2vOv2r0tEp7URrYZaZu1s2rjokP7SEfwnk4gu9QLX+S/3WMg2lBtx20q9 vdWb5trSxtbQrXaGQgGf+8Uri1xzWs2d3XRE/Sgc= 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.10 074/104] Revert "net: stmicro: fix a missing check of clk_prepare" Date: Mon, 24 May 2021 17:26:09 +0200 Message-Id: <20210524152335.306842828@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152332.844251980@linuxfoundation.org> References: <20210524152332.844251980@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;