We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8795952 commit f3b3c47Copy full SHA for f3b3c47
drivers/mtd/nand/raw/renesas-nand-controller.c
@@ -1297,23 +1297,17 @@ static void rnandc_chips_cleanup(struct rnandc *rnandc)
1297
1298
static int rnandc_chips_init(struct rnandc *rnandc)
1299
{
1300
- struct device_node *np;
1301
int ret;
1302
1303
- for_each_child_of_node(rnandc->dev->of_node, np) {
+ for_each_child_of_node_scoped(rnandc->dev->of_node, np) {
1304
ret = rnandc_chip_init(rnandc, np);
1305
if (ret) {
1306
- of_node_put(np);
1307
- goto cleanup_chips;
+ rnandc_chips_cleanup(rnandc);
+ return ret;
1308
}
1309
1310
1311
return 0;
1312
-
1313
-cleanup_chips:
1314
- rnandc_chips_cleanup(rnandc);
1315
1316
- return ret;
1317
1318
1319
static int rnandc_probe(struct platform_device *pdev)
0 commit comments