Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4883508pjb; Mon, 27 Jul 2020 07:32:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxEzDCI5lo1+1BseYCxxenz7c/El9nIXR3NKv2hfIjL5NzbLPCppcDBIkiTasMCX+aqdiU1 X-Received: by 2002:a17:906:430b:: with SMTP id j11mr12364239ejm.270.1595860367046; Mon, 27 Jul 2020 07:32:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595860367; cv=none; d=google.com; s=arc-20160816; b=NUD6QLZPqukpeZdZRSvUBY9YnB9OpeGGVmktKumtzZ12hTn4DHIU34zYaVMp7DU9I7 nHP9wJCDQdJu+/HmKFr6aIFzNKCaljGmWhvtmVxSqX3ULcUmshSQemhy4HTTLu0tAPl7 LtGafDf7t5ffPLJA4V+xjoAUImKRhMXJhjzbrpY51zYFxDf5U/m5Sb0lZzyVXHKHw2TJ RHX3jiXAtQ740YriBeDwmcWxNVxc1uAMMLvvg0gU3E0PGw8Smno1LZ/6j3zNMQmk4VlC i/Fgc3JJBt5DJMtUWMhn0wiK+VVzxrLr0s6RLnaXKnBiGfY9+jeBHOFGMHCz0vpDmZOw nbiQ== 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=U6M8lO/yUc/jeJKl82c6g1IdcC/GrYPOk0LyBOVwEG8=; b=ZoM4yaJcsLob6AVh0fEZjIpaL4uv+qF9geWa8DxLvRSA0GhI/gkh7whPNVHMAcmRx8 T8IRoeimgRiaGATErFvGaBnxOtDi2Vcxyh2MTys+3tpC+wun5y+DdLcLWgBQKrs4PeGG efqn6BvTlAm1KheyddobDAM40i7JRssvcWSiRlM9Wp8ltbeYQr7svvVw5izU2l6qeVF6 pkTyEj9Q8XOka8BaO2tZpXsykG/1bouO7dR1W7VPjZmzRR80siieZzLCYRqjFyWVC88Y Hujm2fLLsN6dSwrg8rP0BB160c5Q5AAAi2pnh0TlH4P8mLKW/A7cvfsd7xovuMR2MVnJ VBZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rbnghd07; 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 bz20si6317489ejc.368.2020.07.27.07.32.24; Mon, 27 Jul 2020 07:32:47 -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=rbnghd07; 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 S1732126AbgG0OXk (ORCPT + 99 others); Mon, 27 Jul 2020 10:23:40 -0400 Received: from mail.kernel.org ([198.145.29.99]:52844 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732118AbgG0OXg (ORCPT ); Mon, 27 Jul 2020 10:23:36 -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 9C1DA2083E; Mon, 27 Jul 2020 14:23:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859816; bh=lKLFzz1koLMHMmMdhUez96JofGg89ksPjKoDytzHQkA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rbnghd07vwvzQXGDm9bC03LT8cKru7wEZ6TUqRA2vop/seooIdptFKT3YGgOcaapB pRdWFvqrANrNuKwVbAGaiIHdp8Shhndds+Br9+z2uIhT7zeOmAMCU7sR9AbWHx2n1k /b+OHYM2lph4qLvhv7K2VwbRRdpjRLUE6IpEoW64= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hulk Robot , Wang Hai , Kunihiko Hayashi , "David S. Miller" , Sasha Levin Subject: [PATCH 5.7 086/179] net: ethernet: ave: Fix error returns in ave_init Date: Mon, 27 Jul 2020 16:04:21 +0200 Message-Id: <20200727134936.877009671@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: Wang Hai [ Upstream commit 1264d7fa3a64d8bea7aebb77253f917947ffda25 ] When regmap_update_bits failed in ave_init(), calls of the functions reset_control_assert() and clk_disable_unprepare() were missed. Add goto out_reset_assert to do this. Fixes: 57878f2f4697 ("net: ethernet: ave: add support for phy-mode setting of system controller") Reported-by: Hulk Robot Signed-off-by: Wang Hai Reviewed-by: Kunihiko Hayashi Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/socionext/sni_ave.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/socionext/sni_ave.c b/drivers/net/ethernet/socionext/sni_ave.c index 67ddf782d98a5..897c895629d03 100644 --- a/drivers/net/ethernet/socionext/sni_ave.c +++ b/drivers/net/ethernet/socionext/sni_ave.c @@ -1191,7 +1191,7 @@ static int ave_init(struct net_device *ndev) ret = regmap_update_bits(priv->regmap, SG_ETPINMODE, priv->pinmode_mask, priv->pinmode_val); if (ret) - return ret; + goto out_reset_assert; ave_global_reset(ndev); -- 2.25.1