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 <heikki.krogerus@linux.intel.com> Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent f2c7c76 commit a799698

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎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)