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
..
2022-04-25 09:25:00 +02:00
2021-10-05 08:50:15 -04:00
2022-08-04 16:18:47 -04:00
2022-08-04 16:18:47 -04:00
2022-08-09 08:58:27 +02:00
2022-01-13 07:57:49 -05:00
2022-09-02 13:25:01 +02:00
2022-01-13 07:57:49 -05:00
2022-08-26 15:00:05 -04:00
2022-09-02 13:25:01 +02:00
2022-08-23 12:39:00 +02:00
2022-09-03 16:59:05 +03:00
2022-05-03 21:39:22 +02:00
2021-10-01 21:08:18 -04:00