diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2019-05-31 16:15:32 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2019-06-03 10:55:38 +0200 |
commit | a79969868a308b3cc7abda02e1526d37dacdee27 (patch) | |
tree | 805901124f74a41f960c1635bbfd1ee8d157ba9c /drivers/base | |
parent | Linux 5.2-rc3 (diff) | |
download | linux-a79969868a308b3cc7abda02e1526d37dacdee27.tar.xz linux-a79969868a308b3cc7abda02e1526d37dacdee27.zip |
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/swnode.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c index 7fc5a18e02ad..30077454eb68 100644 --- a/drivers/base/swnode.c +++ b/drivers/base/swnode.c @@ -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++; |