Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1219704
| From | David Miller <davem@davemloft.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] net: fec: normalize return value of pm_runtime_get_sync() in MDIO write |
| Date | 2015-09-06 07:10 +0200 |
| Message-ID | <q5Anf-5Q6-1@gated-at.bofh.it> (permalink) |
| References | <q4Iwx-4D6-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> Date: Thu, 03 Sep 2015 21:38:30 +0200 > If fec MDIO write method succeeds its return value comes from > call to pm_runtime_get_sync(). > But pm_runtime_get_sync() can also return 1. > > In case of Micrel KSZ9031 PHY this value will then > be returned along the call chain of phy_write() -> > ksz9031_extended_write() -> ksz9031_center_flp_timing() -> > ksz9031_config_init() -> phy_init_hw() -> phy_attach_direct() -> > phy_connect_direct(). > > Then phy_connect() will cast it into a pointer using ERR_PTR(), > which then fec_enet_mii_probe() will try to dereference > resulting in an oops. > > Fix it by normalizing return value of pm_runtime_get_sync() > to be zero if positive in MDIO write method. > > Signed-off-by: Maciej Szmigiero <mail@maciej.szmigiero.name> Applied. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] net: fec: normalize return value of pm_runtime_get_sync() in MDIO write "Maciej S. Szmigiero" <mail@maciej.szmigiero.name> - 2015-09-03 21:40 +0200 Re: [PATCH] net: fec: normalize return value of pm_runtime_get_sync() in MDIO write Andrew Lunn <andrew@lunn.ch> - 2015-09-03 22:00 +0200 Re: [PATCH] net: fec: normalize return value of pm_runtime_get_sync() in MDIO write David Miller <davem@davemloft.net> - 2015-09-06 07:10 +0200
csiph-web