net: fec_imx: Fix resource rollback with regulator errors
Subsystems (3)
PATCH 1/2 net: fec_imx: Fix resource rollback with regulator errors
When the driver is not able to get or control the phy regulator memory resources are already acquired and need to be released during rollback.
Signed-off-by Stefan Riedmueller <[email protected]>
--- drivers/net/fec_imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/fec_imx.c +3 -2
@@ -781,7 +781,8 @@ static int fec_probe(struct device_d *dev)if (IS_ERR (fec->reg_phy)) {if (PTR_ERR (fec->reg_phy) == -EPROBE_DEFER ) { ret = -EPROBE_DEFER ; - goto disable_clk; + fec->reg_phy =NULL ; + goto release_res; } fec->reg_phy =NULL ; }
@@ -789,7 +790,7 @@ static int fec_probe(struct device_d *dev) ret =regulator_enable (fec->reg_phy);if (ret) {dev_err (dev,"Failed to enable phy regulator: %d\n" , ret); - goto disable_clk; + goto release_res; } phy_reset =of_get_named_gpio (dev->device_node,"phy-reset-gpios" ,0 );
Signature · 7 lines
2.7.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
PATCH 2/2 ARM: dts: imx6qdl: pfla02: Remove fec phy-supply
There is no driver for the phyFLEX-i.MX 6 phy-supply regulator in the barebox. Use a dummy regulator instead by simply deleting the phy-supply property.
Signed-off-by Stefan Riedmueller <[email protected]>
--- arch/arm/dts/imx6qdl-phytec-pfla02.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/dts/imx6qdl-phytec-pfla02.dtsi +4 -0
@@ -86,6 +86,10 @@ }; }; +&fec { + /delete-property/ phy-supply; +}; + &gpmi { partitions { compatible = "fixed-partitions";
Signature · 7 lines
2.7.4 _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox
Quoted 8 lines · Stefan Riedmueller
When the driver is not able to get or control the phy regulator memory resources are already acquired and need to be released during rollback.
Signed-off-by Stefan Riedmueller <[email protected]>--- drivers/net/fec_imx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
Signature · 9 lines
Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list [email protected] http://lists.infradead.org/mailman/listinfo/barebox