Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Florian Fainelli
On 09/23/2017 09:57 AM, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a null > pointer dereference. Fix this

Re: [PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Joe Perches
On Sat, 2017-09-23 at 17:57 +0100, Colin King wrote: > From: Colin Ian King > > Currently p->phy is being null checked in several places to avoid > null pointer dereferences on p->phy, however, the final call > to phy_attached_info on p->phy when p->phy will perform a null > pointer dereference.

[PATCH] net: dsa: avoid null pointer dereference on p->phy

2017-09-23 Thread Colin King
From: Colin Ian King Currently p->phy is being null checked in several places to avoid null pointer dereferences on p->phy, however, the final call to phy_attached_info on p->phy when p->phy will perform a null pointer dereference. Fix this by simply moving the call into the previous code block t