Re: [PATCH] USB: phy: am335x-control: fix device and of_node leaks

2016-11-03 Thread Bin Liu
On Thu, Nov 03, 2016 at 10:54:33AM +0200, Felipe Balbi wrote: > > Hi, > > Johan Hovold writes: > > Make sure to drop the references taken by of_parse_phandle() and > > bus_find_device() before returning from am335x_get_phy_control(). > > > > Note that there is no guarantee

Re: [PATCH] USB: phy: am335x-control: fix device and of_node leaks

2016-11-03 Thread Felipe Balbi
Hi, Johan Hovold writes: > Make sure to drop the references taken by of_parse_phandle() and > bus_find_device() before returning from am335x_get_phy_control(). > > Note that there is no guarantee that the devres-managed struct > phy_control will be valid for the lifetime of

[PATCH] USB: phy: am335x-control: fix device and of_node leaks

2016-11-01 Thread Johan Hovold
Make sure to drop the references taken by of_parse_phandle() and bus_find_device() before returning from am335x_get_phy_control(). Note that there is no guarantee that the devres-managed struct phy_control will be valid for the lifetime of the sibling phy device regardless of this change. Fixes: