Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3285679ybb; Tue, 31 Mar 2020 02:06:33 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtz3As/EvKdHMfGnkNQBO1SmI8W0wx1fe5ZibXU3llBRf7mbEbQWlAD+UumXvUyxMvfqTEZ X-Received: by 2002:aca:bd46:: with SMTP id n67mr1317122oif.120.1585645593282; Tue, 31 Mar 2020 02:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585645593; cv=none; d=google.com; s=arc-20160816; b=0HI07r8lMGqIkeXBsvW8oq6uQtuOAk3YX1oE9u4BkLl8Mnaf9yJDVW3mAdhdfwquJw tPNwbNlflE4QRMrByfSGxcidYaykYZUeujJVTYS1hVE+9/6yEvtHidq+PBZK9c9O2DJ5 GUycl1lt7gGJUoYXqe/kTTfm04ncpk0EXO6vyUKmJ7PfnB4SoMzsvoq1ZeqZxLNKAmEh +71VIhut7HtJDBe/EUdfhusIkKpI8DzL+AMzHPP8KavDikzGqqBB+6jPR0DYRDbta4YX cKGgPRUK3qqfvhvq3tjNAVjQ1b+Z36Yk1TkS4Mwo3z5tlZfo6C0bW4gfI+8EjJyrpqd0 bD8A== 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=Bon5C8aGUAj6A4nMlvRJYu/sTh3G4FAxNAXRnATgJA4=; b=r7IOcxVnz7S5Oqw5gGU0YuN/YZyadWonFbxwZPZlrMfryeAIKbsL9kIA0GhBXNdx91 J/LSetqUZ2wLjSF+YAwe9IG5ypzH02ZYLp1SoCm7eZx+BR6zR5xpgE/lIeQHkyBOWJwT YwcK9y0ncAaR5Dp2vfnM9uIyLG71qzy8OYG+XbQfY22CnUqR9c42AqSCVBJQKkju6I0F Kw9XlpAbNIsc7gZKm/8AJNPzbHqZNeqIBQuYgjVVYKPEWPoyBjgYjF9SGbgvfwgmskvL wOo21dvprvV77chxDfYG2wbBNtsSg8aul7MHvfZr5ndsShlU4Oy+rR0JqBIpl3AOBU4b rKkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vr34luBD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d18si7574504otf.22.2020.03.31.02.06.21; Tue, 31 Mar 2020 02:06:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Vr34luBD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731002AbgCaJEu (ORCPT + 99 others); Tue, 31 Mar 2020 05:04:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:45618 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730648AbgCaJEt (ORCPT ); Tue, 31 Mar 2020 05:04:49 -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 1BE6520787; Tue, 31 Mar 2020 09:04:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1585645488; bh=PndM6PtHusE/G30Hx9O5MCKkXCtbBUHeBRG+pkQeq0c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vr34luBDrXgFBoxxBigBQQyWcKDumzUXn6wpNFD117+aP1p0PqbG/wFhooeTZbmFv hpslo8XIxCp0a7d7M+WD5jc5UzDWTURwbF/b7iur59rbKB91zYeNPToGwiBwyB3vlC Lx7wXZqXCTKMz35Ct+HCico4KeJfjgvkqma8I58g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dajun Jin , Andrew Lunn , "David S. Miller" , Sasha Levin Subject: [PATCH 5.5 067/170] drivers/of/of_mdio.c:fix of_mdiobus_register() Date: Tue, 31 Mar 2020 10:58:01 +0200 Message-Id: <20200331085431.560157794@linuxfoundation.org> X-Mailer: git-send-email 2.26.0 In-Reply-To: <20200331085423.990189598@linuxfoundation.org> References: <20200331085423.990189598@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: Dajun Jin [ Upstream commit 209c65b61d94344522c41a83cd6ce51aac5fd0a4 ] When registers a phy_device successful, should terminate the loop or the phy_device would be registered in other addr. If there are multiple PHYs without reg properties, it will go wrong. Signed-off-by: Dajun Jin Reviewed-by: Andrew Lunn Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/of/of_mdio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index fc757ef6eadc5..a27234c58ec56 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -269,6 +269,7 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) rc = of_mdiobus_register_phy(mdio, child, addr); if (rc && rc != -ENODEV) goto unregister; + break; } } } -- 2.20.1