>
>> ---
>>   drivers/net/ethernet/cavium/octeon/octeon_mgmt.c | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
>> b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
>> index e8bc15b..5eb9d8c 100644
>> --- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
>> +++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
>> @@ -960,6 +960,7 @@ static int octeon_mgmt_init_phy(struct net_device 
>> *netdev)
>>      phydev = of_phy_connect(netdev, p->phy_np,
>>                              octeon_mgmt_adjust_link, 0,
>>                              PHY_INTERFACE_MODE_MII);
>> +    of_node_put(p->phy_np);
>
>I don't think you can do this here.  octeon_mgmt_init_phy() may be called 
>multiple
>times in the life of the driver, so p->phy_np must remain valid.
>
>It may be appropriate to do the  of_node_put() in the
>octeon_mgmt_remove() function.
 
Thanks, I will change it.

Peter

Reply via email to