Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp4868571pjb; Mon, 27 Jul 2020 07:13:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy5WJf1QpLjimTrIOLjVZ3y3HWUs9/roLHJdlKYKQZvANngjpTMy3yQCcr+VjhnG4At3X/V X-Received: by 2002:a17:906:b890:: with SMTP id hb16mr10881831ejb.376.1595859211537; Mon, 27 Jul 2020 07:13:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595859211; cv=none; d=google.com; s=arc-20160816; b=qpMzUtVFEgnWIZDIVR7fnnureY6Y1x4RZT8GDzVrsNV1eJxIJhlpR6/nIaNyPPB9hN iLSiWPcSB9hlHiXh1lTiegFqS5QXOvudTiWf488w6TLGzVLJ/rocI+HgxRGqU7Q3ZRWU 3if9EO3xY7otFhA0WzA2mqUnwnRZqMqIHj7GpcQKarWkoyyclSUWlRFf3pSTvWwXcEAz 9q21841zLBj4p/0dzbAIg1BzXEPPvQIk9ro+z/cZAcu28UwxRQ3qL0H1YbQJR43V2v2q yg+MqWNmnA8n+XysQlTHhDPqEhcY9X8Xwe9yLmxYDZGeN7uLWLWcVDji6E3BoEeLUW5/ POLg== 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=ThgyY8nbL6Lh+0QbqSjhB2xzYlm+X2yWjXUlOJAntic=; b=xXdxYoSY6KBiclD/pxbNiBBwbU7crhQKAu8FipKqTd5mzr6AUlGTkMTv5OoERXz1X7 GVkGOBb3AkisXhtsmzflTOLeiMWG3VTdzr5nH/7UcVFDpwvih9ICgOs8luITiUjsbt4j Z/CNIKJImoq2yQAPOLO7xVPG5kigQWBQEY+513+WxaSE3ngKwMOSsutmjlKjeLfmc2K4 4Zxocx6ariiqn9chaba4/kQKDtlEnrMcAJDP71g/4iYdj3M4102QRpb+4sMzkBuROUy/ e+pB5W0IeTqGHtts9vQR2xCHAPfsjr4pY/Sp5JCsWfjOFukUIRLul3cuxBbTr8tT7zHx Poaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Dz/FFmju"; 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 be1si2762035edb.53.2020.07.27.07.13.09; Mon, 27 Jul 2020 07:13:31 -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="Dz/FFmju"; 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 S1730077AbgG0OLr (ORCPT + 99 others); Mon, 27 Jul 2020 10:11:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:35566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730054AbgG0OLp (ORCPT ); Mon, 27 Jul 2020 10:11:45 -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 C1C2721775; Mon, 27 Jul 2020 14:11:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595859105; bh=g/k/+eebFLLg+bq8uWIyE9YLJLGd/5lTSjMBtr8d9EE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dz/FFmjuJtS7LHYwHKsexp2a4fUFSX9/tq4ST7l4WNyp4GFt3k3RgDYAEWa3McqbK 6CiIiXSBpet5Smrf9KxP+SFkNE2tZcJuwsHx2BhqobovWelgt6st8HpZeLidw3inGu lbc4qMhsYi38y06wvDVZAhr8ZRiavVj89jD2cB/Y= 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 4.19 37/86] net: ethernet: ave: Fix error returns in ave_init Date: Mon, 27 Jul 2020 16:04:11 +0200 Message-Id: <20200727134916.293591334@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200727134914.312934924@linuxfoundation.org> References: <20200727134914.312934924@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 c309accc6797e..01cde5f27eade 100644 --- a/drivers/net/ethernet/socionext/sni_ave.c +++ b/drivers/net/ethernet/socionext/sni_ave.c @@ -1196,7 +1196,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