[PATCH 23/32] of: overlay: drop unused variable of_overlay_apply_dir()

Ahmad Fatoum a.fatoum at pengutronix.de
Mon Sep 5 02:55:48 PDT 2022


This seems to be a copy-paste left-over from of_overlay_filter_filename,
which has some actual use for both p and path. We don't though and just
end up leaking the buffer, so drop these variables.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/of/overlay.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/of/overlay.c b/drivers/of/overlay.c
index 20a43f5170c8..fff1d6ea028e 100644
--- a/drivers/of/overlay.c
+++ b/drivers/of/overlay.c
@@ -418,7 +418,6 @@ void of_overlay_set_basedir(const char *path)
 static int of_overlay_apply_dir(struct device_node *root, const char *dirname,
 				bool filter)
 {
-	char *p, *path;
 	int ret = 0;
 	DIR *dir;
 
@@ -431,8 +430,6 @@ static int of_overlay_apply_dir(struct device_node *root, const char *dirname,
 	if (!dir)
 		return -errno;
 
-	p = path = strdup(of_overlay_filepattern);
-
 	while (1) {
 		struct dirent *ent;
 		char *filename;
-- 
2.30.2




More information about the barebox mailing list