diff options
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/of/base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index 9095b8290150..74eaedd5b860 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
| @@ -140,6 +140,9 @@ void of_populate_phandle_cache(void) | |||
| 140 | if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) | 140 | if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) |
| 141 | phandles++; | 141 | phandles++; |
| 142 | 142 | ||
| 143 | if (!phandles) | ||
| 144 | goto out; | ||
| 145 | |||
| 143 | cache_entries = roundup_pow_of_two(phandles); | 146 | cache_entries = roundup_pow_of_two(phandles); |
| 144 | phandle_cache_mask = cache_entries - 1; | 147 | phandle_cache_mask = cache_entries - 1; |
| 145 | 148 | ||
