Skip to content

Commit a799698

Browse files
Heikki Krogerusrafaeljw
authored andcommitted
software node: Allow node creation without properties
Software nodes are not forced to have device properties. Adding check to property_entries_dup() to make it possible to create software nodes that don't have any properties. Signed-off-by: Heikki Krogerus <[email protected]> Tested-by: Hans de Goede <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent f2c7c76 commit a799698

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/base/swnode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ property_entries_dup(const struct property_entry *properties)
383383
int i, n = 0;
384384
int ret;
385385

386+
if (!properties)
387+
return NULL;
388+
386389
while (properties[n].name)
387390
n++;
388391

0 commit comments

Comments
 (0)