mirror of
https://github.com/torvalds/linux.git
synced 2026-06-03 20:14:06 +02:00
Devicetree fixes for v6.19, part 3:
- Fix a refcount leak in of_alias_scan() - Support decending into child nodes when populating nodes in /firmware -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAmlwAPAACgkQ+vtdtY28 YcPl+w//ZFiI8NJWbHPxRE6oDVTM7q79F5ob73fVYbkAUGGQX+sgYngZ/I148JX6 RSn9RDeCC48QYJCcGKSScNgZeKUDxOzBllgp8FhqQ+t+hqXLXtR1ec9VPrpHazf6 xY1OAqRvxsQgwZ4Dn77IypQ1DzufR7PvOGpBMoKwUG+HwRlLX+xsP5fpFhTlP5gV YpdX1Kg9YFFlk3kylMonB+PXXoLkJuvskPDHKVQuAClVKU+TYbG/C9mfnFoLuZke YuQcf6vDOdvZwct0jK8Nv6yyoZSfD3mNkCGYFYR8V+b4xct2sdkUBvXwe1viRFqB 8cyg21s1n87QJOGI+BwfrNQFWaCtD9xn1yUN5Ai/sL4SodiHmcqxvIsHnJYt3UeA S/eNOoeyY97jc67cfoSo8O/FMMmGt0ACoHp+aS/0MgTVglsJUWzi+BqYE8s0Z7uL 0YFjoZrI0B1n8flfM9uAyV4PsdWi73BSOjbFYNJBa2JpYjklGlKA2urCNDCQAgVR 6pNg+w10NXGecaO0i/FHgLwMoz3rq8o7SwvpOOvUOhNM0bkAUGS/LLG3xY5YoMAB Q30fndgsfgrff+3UwbuoPdpXOJxMNiOT5gFy2jGA7NvEhaYOxdQ1S7xRFSaTvQ4k XtdVY8FHmJ19pLDaQSjgFSjysSPy48nQgwy+yCSt1oD9M9D4oMY= =0Vm+ -----END PGP SIGNATURE----- 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
This commit is contained in:
commit
6c790212c5
|
|
@ -1942,13 +1942,17 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
|
|||
end--;
|
||||
len = end - start;
|
||||
|
||||
if (kstrtoint(end, 10, &id) < 0)
|
||||
if (kstrtoint(end, 10, &id) < 0) {
|
||||
of_node_put(np);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Allocate an alias_prop with enough space for the stem */
|
||||
ap = dt_alloc(sizeof(*ap) + len + 1, __alignof__(*ap));
|
||||
if (!ap)
|
||||
if (!ap) {
|
||||
of_node_put(np);
|
||||
continue;
|
||||
}
|
||||
memset(ap, 0, sizeof(*ap) + len + 1);
|
||||
ap->alias = start;
|
||||
of_alias_add(ap, np, id, start, len);
|
||||
|
|
|
|||
|
|
@ -569,7 +569,7 @@ static int __init of_platform_default_populate_init(void)
|
|||
|
||||
node = of_find_node_by_path("/firmware");
|
||||
if (node) {
|
||||
of_platform_populate(node, NULL, NULL, NULL);
|
||||
of_platform_default_populate(node, NULL, NULL);
|
||||
of_node_put(node);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user