Skip to content

Commit

Permalink
Merge tag 'devicetree-fixes-for-4.19-2' of git://git.kernel.org/pub/s…
Browse files Browse the repository at this point in the history
…cm/linux/kernel/git/robh/linux

Pull DeviceTree fix from Rob Herring:
 "One regression for a 20 year old PowerMac:

   - Fix a regression on systems having a DT without any phandles which
     happens on a PowerMac G3"

* tag 'devicetree-fixes-for-4.19-2' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of: fix phandle cache creation for DTs with no phandles
  • Loading branch information
torvalds committed Sep 14, 2018
2 parents d7c0268 + e54192b commit 090b75b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/of/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,9 @@ void of_populate_phandle_cache(void)
if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL)
phandles++;

if (!phandles)
goto out;

cache_entries = roundup_pow_of_two(phandles);
phandle_cache_mask = cache_entries - 1;

Expand Down

0 comments on commit 090b75b

Please sign in to comment.