Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: micrel: Pass .probe for KS8737

Since commit f1131b9c23fb ("net: phy: micrel: use
kszphy_suspend()/kszphy_resume for irq aware devices") the kszphy_suspend/
resume hooks are used.

These functions require the probe function to be called so that
priv can be allocated.

Otherwise, a NULL pointer dereference happens inside
kszphy_config_reset().

Cc: stable@vger.kernel.org
Fixes: f1131b9c23fb ("net: phy: micrel: use kszphy_suspend()/kszphy_resume for irq aware devices")
Reported-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Fabio Estevam <festevam@denx.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20220504143104.1286960-2-festevam@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Fabio Estevam and committed by
Jakub Kicinski
15f03ffe e333eed6

+1
+1
drivers/net/phy/micrel.c
··· 2657 2657 .name = "Micrel KS8737", 2658 2658 /* PHY_BASIC_FEATURES */ 2659 2659 .driver_data = &ks8737_type, 2660 + .probe = kszphy_probe, 2660 2661 .config_init = kszphy_config_init, 2661 2662 .config_intr = kszphy_config_intr, 2662 2663 .handle_interrupt = kszphy_handle_interrupt,