diff options
Diffstat (limited to 'core/device.c')
-rw-r--r-- | core/device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/device.c b/core/device.c index ba427de..807764c 100644 --- a/core/device.c +++ b/core/device.c @@ -805,6 +805,10 @@ unsigned int dt_count_addresses(const struct dt_node *node) p = dt_require_property(node, "reg", -1); n = (na + ns) * sizeof(u32); + + if (n == 0) + return 0; + return p->len / n; } |