Commit e88fbc3
net: ftgmac100: fix potential NULL pointer access in ftgmac100_phy_disconnect
After the call to phy_disconnect() netdev->phydev is reset to NULL.
So fixed_phy_unregister() would be called with a NULL pointer as argument.
Therefore cache the phy_device before this call.
Fixes: e24a6c8 ("net: ftgmac100: Get link speed and duplex for NC-SI")
Cc: [email protected]
Signed-off-by: Heiner Kallweit <[email protected]>
Reviewed-by: Dawid Osuchowski <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>1 parent 966c529 commit e88fbc3
1 file changed
+4
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1750 | 1750 | | |
1751 | 1751 | | |
1752 | 1752 | | |
| 1753 | + | |
1753 | 1754 | | |
1754 | | - | |
| 1755 | + | |
1755 | 1756 | | |
1756 | 1757 | | |
1757 | | - | |
| 1758 | + | |
1758 | 1759 | | |
1759 | 1760 | | |
1760 | 1761 | | |
1761 | 1762 | | |
1762 | | - | |
| 1763 | + | |
1763 | 1764 | | |
1764 | 1765 | | |
1765 | 1766 | | |
| |||
0 commit comments