mirror of
https://github.com/linux-msm/qdl.git
synced 2026-02-25 13:12:25 -08:00
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:
6
patch.c
6
patch.c
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user