Patch "net: fec: free/restore resource in related probe error pathes" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: fec: free/restore resource in related probe error pathes

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-fec-free-restore-resource-in-related-probe-error-pathes.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From foo@baz Sat Jan 13 10:51:05 CET 2018
From: Fugang Duan <fugang.duan@xxxxxxx>
Date: Thu, 4 Jan 2018 10:47:20 +0800
Subject: net: fec: free/restore resource in related probe error pathes

From: Fugang Duan <fugang.duan@xxxxxxx>


[ Upstream commit d1616f07e8f1a4a490d1791316d4a68906b284aa ]

Fixes in probe error path:
- Restore dev_id before failed_ioremap path.
  Fixes: ("net: fec: restore dev_id in the cases of probe error")
- Call of_node_put(phy_node) before failed_phy path.
  Fixes: ("net: fec: Support phys probed from devicetree and fixed-link")

Signed-off-by: Fugang Duan <fugang.duan@xxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/net/ethernet/freescale/fec_main.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -3543,11 +3543,11 @@ failed_clk_ipg:
 failed_clk:
 	if (of_phy_is_fixed_link(np))
 		of_phy_deregister_fixed_link(np);
-failed_phy:
 	of_node_put(phy_node);
+failed_phy:
+	dev_id--;
 failed_ioremap:
 	free_netdev(ndev);
-	dev_id--;
 
 	return ret;
 }


Patches currently in stable-queue which might be from fugang.duan@xxxxxxx are

queue-4.14/net-fec-defer-probe-if-regulator-is-not-ready.patch
queue-4.14/net-fec-free-restore-resource-in-related-probe-error-pathes.patch
queue-4.14/net-fec-restore-dev_id-in-the-cases-of-probe-error.patch



[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]