[PATCH v18 3/5] phy: core: Add devm_phy_get_by_of_node()

Bryan O'Donoghue bod at kernel.org
Thu Sep 17 08:03:17 PDT 2026


On 17/09/2026 14:27, Bryan O'Donoghue wrote:
> On 17/09/2026 13:32, Neil Armstrong wrote:
>>> -        dev_dbg(dev, "failed to create device link to %s\n",
>>> +        dev_err(dev, "failed to create device link to %s\n",
>>>                dev_name(phy->dev.parent));
>>
>> This change belongs in another patch.
> 
> Doh Frank gave me a comment on this and I just changed it without
> realising this isn't in my series at all.
> 
> I'll drop this altogether
> 
> ---
> bod

Hmm now I see, there's another device_link_add which does a dev_dbg() on 
failure, the feedback was to dev_err() with the part I'm adding below...

+	link = device_link_add(dev, &phy->dev, DL_FLAG_STATELESS);
+	if (!link)
+		dev_dbg(dev, "failed to create device link to %s\n",
+			dev_name(phy->dev.parent));
+

device_link_add() will return NULL when the supplier the PHY is a child 
of the consumer so !link is not an error.

---
bod





More information about the linux-phy mailing list