Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3524275pxj; Mon, 24 May 2021 08:37:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzMnajU67jl2q9UEgdiz7L3Nf7CIFXRfrGJDCKvTmUAyjf8a6NBRnfBo/VokDd+TC7/yAJb X-Received: by 2002:a6b:5c04:: with SMTP id z4mr16254877ioh.51.1621870656636; Mon, 24 May 2021 08:37:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621870656; cv=none; d=google.com; s=arc-20160816; b=KPzsgRMN5BVzZPNFrdt4fwZpP4ckkoen7Ivc4QtKoh5r+mpfB/5no0K9nDT6nRdQEO 0h8YeFppfy/2N3SLJHopqwjWQP0RSpXTmvHqr0Vm+d8flWWk/J5jZepRaeRG8/QMwAyL sRAOjdnv5lienAPfRjaby5wpFTLtA3S2eQDD56A7r48pEQcJGfAjiEABp2U/0QvmxpL3 nHnlh3o2xAMnts4QNRy66iI5ZqiY/EjQzFDhJZlOXpDq7PNIoG2wLQeMYoRybC1kVFzY 9QWRfLTMRLKdNXW3ZGpG5Hf6BXpA1CL1oFZWHATKlzvtLtnENXMku0dBlQIOCM0fdr38 XF7Q== 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=AeEPzsR1s9iloB/3NnzMTbJ9xEGwV9cDiwUYcab6/v7F/M45bBEHOr7eTNq3sWKYGs gTNEJ+rCDQP07YQGRAoYXWXWYpwE+YZUHhAv9G8vQ1X47+ZfgSWL4EUCxwKdcTiwRUAB NP7FoKgDHQgrVlODfvvDv2caPBAj42Qw6hCQwMtptGxhHZA6vSEzEYKGKijCX5R15x+9 7xAWzMQRLhU8cuv0EpdAJDbGxrzRzz9W17nHbI8C5pjJl927sTzMSjp7iovqlBBGq3+y +js6Fr5rdveyElgORNnWml1sZDm3olW/Swhm1bJDpNzLLZaFnjzLZcGgIgdhrLBD0bTi rEog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xGIzVqW+; 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 m25si14105518ioo.79.2021.05.24.08.37.24; Mon, 24 May 2021 08:37:36 -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=xGIzVqW+; 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 S233155AbhEXPhb (ORCPT + 99 others); Mon, 24 May 2021 11:37:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:50504 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233886AbhEXPec (ORCPT ); Mon, 24 May 2021 11:34:32 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 15BA9613F2; Mon, 24 May 2021 15:31:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621870318; bh=3iOAUpIunq8o5uXAQzDcoek9kBPjKvTpZGYDo5alVaY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xGIzVqW+Iu0fIftBFnM9M0knpRmL/H1fWJkQWi+0WnIhcpJa6Aq45YYKXP6xHg/LS GuE52X4kbjmGWDHEC4cGUqqkwQUQx34OfjuquYS8zkJy0mQhVhfJ5kzSqJWuCpro4G tfRWVFlMy45F+Gykwa6jVbFZ6/7W/Tc8opVh/4/I= 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.9 16/36] Revert "net: stmicro: fix a missing check of clk_prepare" Date: Mon, 24 May 2021 17:25:01 +0200 Message-Id: <20210524152324.690959122@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210524152324.158146731@linuxfoundation.org> References: <20210524152324.158146731@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;