From: Fabio Estevam Date: Wed, 4 May 2022 14:31:04 +0000 (-0300) Subject: net: phy: micrel: Pass .probe for KS8737 X-Git-Tag: v6.6.17~7605^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=15f03ffe4bb951e982457f44b6cf6b06ef4cbb93;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Fabio Estevam Reviewed-by: Andrew Lunn Link: https://lore.kernel.org/r/20220504143104.1286960-2-festevam@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 7c243ce..9d7dafe 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -2657,6 +2657,7 @@ static struct phy_driver ksphy_driver[] = { .name = "Micrel KS8737", /* PHY_BASIC_FEATURES */ .driver_data = &ks8737_type, + .probe = kszphy_probe, .config_init = kszphy_config_init, .config_intr = kszphy_config_intr, .handle_interrupt = kszphy_handle_interrupt,