File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1111,7 +1111,7 @@ static void pl35x_nand_chips_cleanup(struct pl35x_nandc *nfc)
1111
1111
1112
1112
static int pl35x_nand_chips_init (struct pl35x_nandc * nfc )
1113
1113
{
1114
- struct device_node * np = nfc -> dev -> of_node , * nand_np ;
1114
+ struct device_node * np = nfc -> dev -> of_node ;
1115
1115
int nchips = of_get_child_count (np );
1116
1116
int ret ;
1117
1117
@@ -1121,10 +1121,9 @@ static int pl35x_nand_chips_init(struct pl35x_nandc *nfc)
1121
1121
return - EINVAL ;
1122
1122
}
1123
1123
1124
- for_each_child_of_node (np , nand_np ) {
1124
+ for_each_child_of_node_scoped (np , nand_np ) {
1125
1125
ret = pl35x_nand_chip_init (nfc , nand_np );
1126
1126
if (ret ) {
1127
- of_node_put (nand_np );
1128
1127
pl35x_nand_chips_cleanup (nfc );
1129
1128
break ;
1130
1129
}
You can’t perform that action at this time.
0 commit comments