Ignore patches with empty filenames.

Some device builds include patches with empty filenames. This change adds a check to ignore those patches and prevent segmentation faults.
This approach ensures consistency with other Qualcomm tools, which also ignore such patches.

Signed-off-by: Yvonne Kaire <ykaire@qti.qualcomm.com>
This commit is contained in:
Yvonne Kaire
2025-11-17 15:03:07 -08:00
parent 2db10bd0c6
commit a3436e2b0a

View File

@@ -80,11 +80,17 @@ int patch_execute(struct qdl_device *qdl, int (*apply)(struct qdl_device *qdl, s
return 0;
list_for_each_entry(patch, &patches, node) {
if (!patch->filename)
continue;
if (!strcmp(patch->filename, "DISK"))
count++;
}
list_for_each_entry(patch, &patches, node) {
if (!patch->filename)
continue;
if (strcmp(patch->filename, "DISK"))
continue;