diff options
| author | Linus Torvalds <[email protected]> | 2026-01-04 16:57:47 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2026-01-04 16:57:47 -0800 |
| commit | 3609fa95fb0f2c1b099e69e56634edb8fc03f87c (patch) | |
| tree | c81abacadca310bd85f9302f6a88384e915dbd03 | |
| parent | 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb (diff) | |
| parent | 235a1eb8d2dcc49a6cf0a5ee1aa85544a5d0054b (diff) | |
| download | gregkh-main.tar.gz | |
Merge tag 'devicetree-fixes-for-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linuxHEADmain
Pull devicetree fixes from Rob Herring:
- Fix an error path memory leak in DT unittest
- Update Saravana's bouncing email
* tag 'devicetree-fixes-for-6.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
of: unittest: Fix memory leak in unittest_data_add()
MAINTAINERS: Update Saravana Kannan's email address
| -rw-r--r-- | .mailmap | 2 | ||||
| -rw-r--r-- | MAINTAINERS | 6 | ||||
| -rw-r--r-- | drivers/of/unittest.c | 8 |
3 files changed, 8 insertions, 8 deletions
diff --git a/.mailmap b/.mailmap index 7a6110d0e46d56..1873cfa1593780 100644 --- a/.mailmap +++ b/.mailmap @@ -705,6 +705,8 @@ Sankeerth Billakanti <[email protected]> <[email protected]> Santosh Shilimkar <[email protected]> Santosh Shilimkar <[email protected]> Sarangdhar Joshi <[email protected]> +Saravana Kannan <[email protected]> <[email protected]> +Saravana Kannan <[email protected]> <[email protected]> Sascha Hauer <[email protected]> Sahitya Tummala <[email protected]> <[email protected]> Sathishkumar Muruganandam <[email protected]> <[email protected]> diff --git a/MAINTAINERS b/MAINTAINERS index 765ad2daa21831..a0dd762f5648b7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6532,7 +6532,7 @@ F: rust/kernel/cpufreq.rs F: tools/testing/selftests/cpufreq/ CPU FREQUENCY DRIVERS - VIRTUAL MACHINE CPUFREQ -M: Saravana Kannan <[email protected]> +M: Saravana Kannan <[email protected]> S: Maintained F: drivers/cpufreq/virtual-cpufreq.c @@ -7170,7 +7170,7 @@ F: drivers/base/devcoredump.c F: include/linux/devcoredump.h DEVICE DEPENDENCY HELPER SCRIPT -M: Saravana Kannan <[email protected]> +M: Saravana Kannan <[email protected]> S: Maintained F: scripts/dev-needs.sh @@ -19547,7 +19547,7 @@ F: include/linux/oa_tc6.h OPEN FIRMWARE AND FLATTENED DEVICE TREE M: Rob Herring <[email protected]> -M: Saravana Kannan <[email protected]> +M: Saravana Kannan <[email protected]> S: Maintained Q: http://patchwork.kernel.org/project/devicetree/list/ diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c index 388e9ec2cccf83..3b773aaf9d0503 100644 --- a/drivers/of/unittest.c +++ b/drivers/of/unittest.c @@ -1985,7 +1985,6 @@ static void attach_node_and_children(struct device_node *np) */ static int __init unittest_data_add(void) { - void *unittest_data; void *unittest_data_align; struct device_node *unittest_data_node = NULL, *np; /* @@ -2004,7 +2003,7 @@ static int __init unittest_data_add(void) } /* creating copy */ - unittest_data = kmalloc(size + FDT_ALIGN_SIZE, GFP_KERNEL); + void *unittest_data __free(kfree) = kmalloc(size + FDT_ALIGN_SIZE, GFP_KERNEL); if (!unittest_data) return -ENOMEM; @@ -2014,12 +2013,10 @@ static int __init unittest_data_add(void) ret = of_fdt_unflatten_tree(unittest_data_align, NULL, &unittest_data_node); if (!ret) { pr_warn("%s: unflatten testcases tree failed\n", __func__); - kfree(unittest_data); return -ENODATA; } if (!unittest_data_node) { pr_warn("%s: testcases tree is empty\n", __func__); - kfree(unittest_data); return -ENODATA; } @@ -2038,7 +2035,6 @@ static int __init unittest_data_add(void) /* attach the sub-tree to live tree */ if (!of_root) { pr_warn("%s: no live tree to attach sub-tree\n", __func__); - kfree(unittest_data); rc = -ENODEV; goto unlock; } @@ -2059,6 +2055,8 @@ static int __init unittest_data_add(void) EXPECT_END(KERN_INFO, "Duplicate name in testcase-data, renamed to \"duplicate-name#1\""); + retain_and_null_ptr(unittest_data); + unlock: of_overlay_mutex_unlock(); |
