Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp112865lqt; Wed, 5 Jun 2024 20:00:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVRxQ5NYq+M69e90gBybzCp2yRJ02k3FT+S3/umgJPrrs3aiGIrgSsmgep9xzLUJtUEK8X1AQ49u/U+9ltizYnFIaxOTp++joYKUL3CIQ== X-Google-Smtp-Source: AGHT+IEQvRId5VIz5ujKF/ikJwHNIcX0mb0k2feYJH/MkpqLdcEUOnD26GjffKzwFYSHR37d2oYt X-Received: by 2002:a17:90a:7105:b0:2c2:4129:a2d3 with SMTP id 98e67ed59e1d1-2c27db5b4a6mr4946620a91.36.1717642831917; Wed, 05 Jun 2024 20:00:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717642831; cv=pass; d=google.com; s=arc-20160816; b=EJj77SRK8BXUcOze8wT2X9oR2q1memtwiJT9S4ZMrWt7PBS/GcGSR0Xycv9fx8+TTa HsdTZbCXO+DnpUjBKYOlIdHmcmXX8OoQ/PgDACy9Z3kKzhyTaeFCl7tTJxF2eEQhgVHZ 1tNJH3vtPMWjfxihfzPPqb6G4tYhlUklRsJCOY4DyVmFphUYMS9br12yl7WtHUA/g33z CZSlwbxFYV8SAmPnMAcxwzMct00fgLTrjnpxUipcFfs6pAbB+/R/ABIWvVnTq/mEp6nN mvA0qb3mvz5tLFZVrNF36iQ9C99GOuC/23tRzNeoYfq/wOHKybY7hc7hVnp2ryoHlevV Ys0g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=hKfBtLyokMfN4tn99ieTnu1L2absShAeLC/gO+/crpw=; fh=MLYYg6WYgAxLJKK1PEJPlfOgabjBiTsfLe67KijedpQ=; b=lxLljFyEXaYTeeIeeREBnQPIzuwOVUH2c0XBo/BcArQlpPaiGRvwLlmDVKPcgdFwFn Ljl1yj3J1WpRTwXs+AGv91ALDIgLl5xYb0wM+li1fZXBtZgvS95TVSn99FuL+et4IOZx aGHsAGxyKSXgtnXSsuZzX9hgQw0N6RPZ7Ag7xeySv7ONcOaU7vJE9c4wQ6+ZJ9y0uCkU HCYi0ccxykjIMQwqZPxT/jv57j1281LFvDZ+VwXKsImdxlbSZgO3iu467e6E3ZfTOFWR 57DDI42XtETXzC4oe+PHwCBNuFYTYAAinWw6c1Sv7IzfnZMSFfRBwuEQ2j39CZ/XTwob 058g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eWXqoDYU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203556-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c29c21bee1si405806a91.55.2024.06.05.20.00.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 20:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-203556-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eWXqoDYU; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-203556-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-203556-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id A7BA1285284 for ; Thu, 6 Jun 2024 03:00:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3A35C224FD; Thu, 6 Jun 2024 03:00:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eWXqoDYU" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5CC6417BD8; Thu, 6 Jun 2024 03:00:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717642804; cv=none; b=YRl0u0jLh198jJuujjeITdusRsTA8pgMwBw9oL/QY1NVN7lkpB4Co18ZWPWUgmVp7R8/eLAYuKr5m/ZT9R4U3HM8LtJcdjp/XB2b9Da5CknxUB0L2YVw0uKcpmUjXd/fzGW0q94l/8xsaV4BsJhVw4bPfw1yvZio9SZTo82mhKE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717642804; c=relaxed/simple; bh=1k0vmlN5n/kux90nXyjEzbw+QNgng6TYrod+njG2UsE=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UpQyX0L+HOA2epZ/XnXDztX8y1QHr5cHR/C8ZMD51FZCJ8pcz6iWw9SCFvBntTIVjsMr+xlFTZ9HX/mz1OFKojh9y1nUMcUA5MORFk2FQcHa38u8UDyEStjoWiIURqUFqqzIK+rID7dQMo9jRrYyqW+SJyxFCq1d2S4/eONjxu8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eWXqoDYU; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7425DC4AF16; Thu, 6 Jun 2024 03:00:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717642803; bh=1k0vmlN5n/kux90nXyjEzbw+QNgng6TYrod+njG2UsE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=eWXqoDYURT10XZqAX+dQkQRcM4PA4VO2uRDW49mqGc2E9PsgWIFYFW0b01KJNpjSV Kl1/yrj4VwS2NILpQkbqmAK1C78OAYjWWjo8adtGntftTxeS4EALNHD/59Ok7Ljjmg Zgo8vVRcgtts15Z12WdN3dlSltCwGOFpyPsaiq9a4f3b7Pl3MkTD9OlhROx2Qh0/U1 XaUJ+OccXAl87VBqKoyNyPIt0HZLvHEXiPzXHZWSESj9d61CdmwcYzCxcpYJp0yf1G a/lJdNkBQ1RQD/PvYzdbig30hv1dIZgA6dLiz15Omhn/KhraBFm+P/kcwWaT6UqEK/ axahNBtQJAdcg== Date: Wed, 5 Jun 2024 20:00:02 -0700 From: Jakub Kicinski To: Andy Shevchenko Cc: Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Paolo Abeni Subject: Re: [PATCH net v1 1/1] net dsa: qca8k: fix usages of device_get_named_child_node() Message-ID: <20240605200002.2b046013@kernel.org> In-Reply-To: <20240604161551.2409910-1-andriy.shevchenko@linux.intel.com> References: <20240604161551.2409910-1-andriy.shevchenko@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 4 Jun 2024 19:15:51 +0300 Andy Shevchenko wrote: > @@ -431,8 +431,10 @@ qca8k_parse_port_leds(struct qca8k_priv *priv, struct fwnode_handle *port, int p > init_data.devicename = kasprintf(GFP_KERNEL, "%s:0%d", > priv->internal_mdio_bus->id, > port_num); > - if (!init_data.devicename) > + if (!init_data.devicename) { > + fwnode_handle_put(leds); > return -ENOMEM; > + } > > ret = devm_led_classdev_register_ext(priv->dev, &port_led->cdev, &init_data); > if (ret) I think there's more bugs in this here loop, if we break or return during fwnode_for_each_child_node() - we need to put the iterator (led).