aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2024-03-25 20:06:19 +0100
committerPaolo Abeni <pabeni@redhat.com>2024-03-28 10:42:22 +0100
commit6a4aee277740d04ac0fd54cfa17cc28261932ddc (patch)
treea47cf9624e796e5db20197f3933080744cb19e32 /drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c
parent005e528c242b19b8131f300dcd4e730e89992acb (diff)
downloadlinux-6a4aee277740d04ac0fd54cfa17cc28261932ddc.tar.gz
net: phy: qcom: at803x: fix kernel panic with at8031_probe
On reworking and splitting the at803x driver, in splitting function of at803x PHYs it was added a NULL dereference bug where priv is referenced before it's actually allocated and then is tried to write to for the is_1000basex and is_fiber variables in the case of at8031, writing on the wrong address. Fix this by correctly setting priv local variable only after at803x_probe is called and actually allocates priv in the phydev struct. Reported-by: William Wortel <wwortel@dorpstraat.com> Cc: <stable@vger.kernel.org> Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe") Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'drivers/net/ethernet/broadcom/asp2/bcmasp_intf.c')
0 files changed, 0 insertions, 0 deletions