File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Expand file tree Collapse file tree 1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -2836,7 +2836,6 @@ static void cadence_nand_chips_cleanup(struct cdns_nand_ctrl *cdns_ctrl)
2836
2836
static int cadence_nand_chips_init (struct cdns_nand_ctrl * cdns_ctrl )
2837
2837
{
2838
2838
struct device_node * np = cdns_ctrl -> dev -> of_node ;
2839
- struct device_node * nand_np ;
2840
2839
int max_cs = cdns_ctrl -> caps2 .max_banks ;
2841
2840
int nchips , ret ;
2842
2841
@@ -2849,10 +2848,9 @@ static int cadence_nand_chips_init(struct cdns_nand_ctrl *cdns_ctrl)
2849
2848
return - EINVAL ;
2850
2849
}
2851
2850
2852
- for_each_child_of_node (np , nand_np ) {
2851
+ for_each_child_of_node_scoped (np , nand_np ) {
2853
2852
ret = cadence_nand_chip_init (cdns_ctrl , nand_np );
2854
2853
if (ret ) {
2855
- of_node_put (nand_np );
2856
2854
cadence_nand_chips_cleanup (cdns_ctrl );
2857
2855
return ret ;
2858
2856
}
You can’t perform that action at this time.
0 commit comments