Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'devicetree-fixes-for-6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:

- Fix a refcount leak in of_alias_scan()

- Support descending into child nodes when populating nodes
in /firmware

* tag 'devicetree-fixes-for-6.19-3' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: fix reference count leak in of_alias_scan()
of: platform: Use default match table for /firmware

+7 -3
+6 -2
drivers/of/base.c
··· 1942 1942 end--; 1943 1943 len = end - start; 1944 1944 1945 - if (kstrtoint(end, 10, &id) < 0) 1945 + if (kstrtoint(end, 10, &id) < 0) { 1946 + of_node_put(np); 1946 1947 continue; 1948 + } 1947 1949 1948 1950 /* Allocate an alias_prop with enough space for the stem */ 1949 1951 ap = dt_alloc(sizeof(*ap) + len + 1, __alignof__(*ap)); 1950 - if (!ap) 1952 + if (!ap) { 1953 + of_node_put(np); 1951 1954 continue; 1955 + } 1952 1956 memset(ap, 0, sizeof(*ap) + len + 1); 1953 1957 ap->alias = start; 1954 1958 of_alias_add(ap, np, id, start, len);
+1 -1
drivers/of/platform.c
··· 569 569 570 570 node = of_find_node_by_path("/firmware"); 571 571 if (node) { 572 - of_platform_populate(node, NULL, NULL, NULL); 572 + of_platform_default_populate(node, NULL, NULL); 573 573 of_node_put(node); 574 574 } 575 575