Siarhei Yasinski 5025224fad net: enetc: Fix use after free issue in fsl_enetc.c
If ethernet connected to SFP, like this:

&enetc_port0 {
            phy-connection-type = "sgmii";
            sfp = <&sfp0>;
            managed = "in-band-status";
            status = "okay";
};

Then enetc_config_phy returns -ENODEV and the memory containing the mdio interface is freed.
It's better to unregister and free mdio resources.

Signed-off-by: Siarhei Yasinski <siarhei.yasinski@sintecs.eu>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2022-09-06 09:28:47 +08:00
..
2021-02-24 16:51:49 -05:00
2021-09-28 18:50:56 +03:00
2022-07-26 11:29:01 +02:00
2022-08-20 21:18:15 -04:00
2022-03-25 12:01:15 +00:00
2022-05-04 07:05:51 +02:00
2021-02-15 10:16:24 -05:00