Re: [PATCH net-next 14/15] net: dsa: sja1105: replace mdiobus-pcs with xpcs-plat driver

Jakub Kicinski
2025-11-19T00:41:34Z

On Tue, 18 Nov 2025 21:05:29 +0200 Vladimir Oltean wrote:
> +static bool sja1105_child_node_exists(struct device_node *node,
> + const char *name,
> + const struct resource *res)
> +{
> + struct device_node *child = of_get_child_by_name(node, name);
> + u32 reg[2];
> +
> + for_each_child_of_node(node, child) {
> + if (!of_node_name_eq(child, name))
> + continue;
> +
> + if (of_property_read_u32_array(child, "reg", reg, ARRAY_SIZE(reg)))
> + continue;
> +
> + if (reg[0] == res->start && reg[1] == resource_size(res))
> + return true;

coccicheck says you're likely leaking the reference on the child here

> + }
> +
> + return false;
> +}
--
pw-bot: cr