🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #22029

Re: [PATCH net 4/5] net: dsa: mt7530: disable regulators on setup failure

#22029
From: Andrew Lunn
Date: Tue, 24 Nov 2026 18:42
17 lines
9018 bytes
On Tue, Nov 24, 2026 at 04:25:57PM +0800, Haoran Wang wrote:
> Once the core and io regulators have been enabled, every later failure
> in mt7530_setup() returned without disabling them, leaving the rails
> enabled and making the regulator core warn when devres later puts an
> enabled regulator.
> 
> Route those failure paths to a common error label that disables both
> regulators, and disable the already enabled core regulator if enabling
> the io regulator fails.
> 
> Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
> Signed-off-by: Haoran Wang <wanghr2026@mail.zgclab.edu.cn>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Technical Details
Message-ID: <d31b32a8-cbc1-4649-9a74-85a6d479a8d0@lunn.ch>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370686-linux-kernel-netdev=dewy.ru
References: <179550875789.4156.361477684651496992@mail.zgclab.edu.cn> <179550875790.4156.6284290287819341762@mail.zgclab.edu.cn>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-370686-linux-kernel-netdev=dewy.ru
From: andrew@lunn.ch (Andrew Lunn)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net 4/5] net: dsa: mt7530: disable regulators on setup
 failure
Date: Tue, 24 Nov 2026 19:42:32 +0100
Organization: Usenet Network
Message-ID: <d31b32a8-cbc1-4649-9a74-85a6d479a8d0@lunn.ch>
References: <179550875789.4156.361477684651496992@mail.zgclab.edu.cn>
 <179550875790.4156.6284290287819341762@mail.zgclab.edu.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="12125"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:hSXp0KeZ3WdBhj9n7H1BqlIDg6U= sha256:SJMVflwWjvI2ffjoXKiJ8dsGJmYgNvEoanB+jtwRYfI=
	sha1:AvPevVnXxiMT9dDYeUR11opK98g= sha256:ThbLdaplzTCOnr7SBT1b8yWRiEXVFzJx2uQ7lyZsTZE=
Content-Disposition: inline
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 33C01125E22; Tue, 24 Nov 2026 21:43:05 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=lunn.ch
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id KSAOSUmzT-6h;
	Tue, 24 Nov 2026 21:43:02 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-370686-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id EA6CD125E29; Tue, 24 Nov 2026 21:42:52 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 84D7F33EF3; Tue, 24 Nov 2026 18:42:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1795545770;
	b=Z2OskAUAefIUbZDP+9z7P0fkj8trawXgEly2QpaZuGoYhuo6I/FqGi3IljqFb+ft6jjs
	 eyx4Tho5Efn5hOvI7SI1mxgpOf11dxUEh0NFCiUfgBXoEDX5595VJFMB4pFdxynrDyioI
	 9YQNgTe2rgFK0T04OddZRlEYOa8iQKPOeujjHOUSyd//tYsu4yav7V9+AjVOJ5Jyuxnzu
	 RqaS5ljrLB5XbpEAIS+gJ2v1r/QlNt1ehEWNGzxQadE5l7Crzmz+5HN1CqQ4ED2Jjmbgl
	 FUJL7xmxCrvbPctfKDBaQFeTVgLxiUWeyRxZYZQ250KdODHuSxBoMpOpfByDij/7PLA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795545770;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To;
	bh=MIuIK6OTrAaRf7WvqeRgQl00U2uvIZ8xlyhNJbCOjz8=;
	b=fBVG3sUsGRrpxcMVnmOse9LOSMR5AwmsKAwh0HyOaRobQJzFPDIqq44jptJu9DQ1Qf8s
	 Y7X6TewEumBwFx8I+QTeMVWoAfWz94Hpbblehbu5D5rjAcVgMyBIg5tHMguwsdjM0m/sb
	 urfj0qHzSRgAnbiPslXB2KdUenAwT/NcYWf5EpGwCKywBFxCekx6HE9HRLCuOwG7KpMDG
	 6OeBfWyvl0GZXnjCtssiaA5SUF6wmwg9/a65Dw3E3OkzOQLuDnYzDT299Yx/Tr1Us5vi8
	 35lzCoIx95ITN5sgbYduBLCmmyP3DS5jxDHiBWnqiuupWioI/mjotrrLdbxS0azQNfg==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b="J/8hRVbb";
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 0D8E9606A32E;
	Tue, 24 Nov 2026 18:42:50 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=J/8hRVbb
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1795545769;
	b=Notmd/MeNo/dmoK9iFkT6RZI9u4eDGJjCfZAwUy0T3O2Gjf2dZJFDqgiCt7cPlra0W/W
	 yLIviSltsWZ36Q70bmo/lmVYDQcRQSNl7jJdtVuEr7cdfYHS3qALIcmE/xLikg7qD5SrW
	 Zy8SCKZpm/mRrPP16jCaFqnB5loQmcxXqdnM3qJImEZumZtvVp5JWgiOkMbkoOZdWd4QS
	 vpsR3upS+3BmbABG9UNnoSoiaN2zEjxuujKvbeR75OUsJTWxX1+VabQltdj3eBbTaQ+Op
	 pND3am6wFzvwEKmhaxc9sZ0oTmLRvJAkxm7vqpJBZWNmLFR1uJD8qYVCLIn3u+ugfZg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1795545769;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:References:MIME-Version:Content-Type:Content-Disposition:
	 In-Reply-To;
	bh=MIuIK6OTrAaRf7WvqeRgQl00U2uvIZ8xlyhNJbCOjz8=;
	b=TKCE5yUFYaWG060uAMct0ZAMNajptZuOAe/mNWOMqP0/apQUezQCByo4IUN7ape5s5W5
	 A3E8BeTpjmK+P14tx4rvaIKVvQMYm3QmYrx8SnFFyt2Ae1lNg0WgFtMbt9mX/nNnJpfN2
	 cNmMo+ALSGd7AQPTT09a9VJI9YvE/+kRYbNWbHhiUdjgiAYDqwLCgSKKQA005QsJuClBp
	 YIQhGwn8bLhMqZtlm5b7KCuA83rRlk6TWut/MZPsWukNufhR8sDkdnLOGLNAxkveySX5S
	 Dmez3w9tz+gZctx9REsG3iup/YUSRF8RZVzLBQFEguFqwoDCZD8a4ML9q9pYgDG7cFQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=lunn.ch;
	spf=pass smtp.mailfrom=lunn.ch;
	dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b="J/8hRVbb";
	arc=none smtp.remote-ip=156.67.10.101
X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9063606A31E;
	Tue, 24 Nov 2026 18:42:48 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org D9063606A31E
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch
X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch;
	s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version:
	References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject:
	Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:
	Content-ID:Content-Description:Content-Disposition:In-Reply-To:References;
	bh=MIuIK6OTrAaRf7WvqeRgQl00U2uvIZ8xlyhNJbCOjz8=; b=J/8hRVbbPlJPInpoIKtpYnZtsS
	xcHTlKumZX31T9wKrIf1XWA2NUpIOlY5GDutg1KsZBx9byN0hrb5IYLSnGw+tTfn4xexCYYSe5Mhb
	S/MZcztXgWb5i5Q0v+VvUZaFqwmAVJKRM65x9KoukWc7a1A7DwZR14T875hiaQcWuXf4=;
X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2)
	(envelope-from <andrew@lunn.ch>)
	id 1xVvTM-00184Q-2v; Tue, 24 Nov 2026 19:42:32 +0100
X-Cc: chester.a.unal@arinc9.com, daniel@makrotopia.org, olteanv@gmail.com,
	davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
	pabeni@redhat.com, matthias.bgg@gmail.com,
	angelogioacchino.delregno@collabora.com, netdev@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <179550875790.4156.6284290287819341762@mail.zgclab.edu.cn>