Skip to content

Commit

Permalink
software node: Allow node creation without properties
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heikki Krogerus authored and Rafael J. Wysocki committed Jun 3, 2019
1 parent f2c7c76 commit a799698
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/base/swnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ property_entries_dup(const struct property_entry *properties)
int i, n = 0;
int ret;

if (!properties)
return NULL;

while (properties[n].name)
n++;

Expand Down

0 comments on commit a799698

Please sign in to comment.