Re: [net-next PATCH v3 13/15] phylink: introduce phylink_fwnode_phy_connect()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 12, 2021 at 05:55:54PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson
> <calvin.johnson@xxxxxxxxxxx> wrote:
> >
> > Define phylink_fwnode_phy_connect() to connect phy specified by
> > a fwnode to a phylink instance.
> 
> ...
> 
> > +       phy_dev = fwnode_phy_find_device(phy_fwnode);
> > +       /* We're done with the phy_node handle */
> > +       fwnode_handle_put(phy_fwnode);
> > +       if (!phy_dev)
> > +               return -ENODEV;
> > +
> > +       ret = phy_attach_direct(pl->netdev, phy_dev, flags,
> > +                               pl->link_interface);
> > +       if (ret)
> 
> Hmm... Shouldn't you put phy_dev here?
I think you are right. We may have to add
		put_device(&phydev->mdio.dev);
It is missing in phylink_of_phy_connect() as well.
> 
> > +               return ret;
> 
> -- 
Thanks
Calvin



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux