diff options
Diffstat (limited to 'drivers/of/partition.c')
-rw-r--r-- | drivers/of/partition.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/partition.c b/drivers/of/partition.c index 65c24c5426..b71716218b 100644 --- a/drivers/of/partition.c +++ b/drivers/of/partition.c @@ -235,6 +235,9 @@ static int of_partition_fixup(struct device_node *root, void *ctx) struct device_node *np; char *name; + if (!cdev->device_node) + return -EINVAL; + name = of_get_reproducible_name(cdev->device_node); np = of_find_node_by_reproducible_name(root, name); free(name); |