stmmac: intel: Fix kernel panic on pci probe
authorWong Vee Khee <vee.khee.wong@intel.com>
Thu, 29 Oct 2020 09:32:28 +0000 (17:32 +0800)
committerJakub Kicinski <kuba@kernel.org>
Fri, 30 Oct 2020 16:48:06 +0000 (09:48 -0700)
commit785ff20bce2d9f08f4a9299a5e59e2272f0ee1e9
tree96e75be4a1b918cd5206b70fd7e4e4922f19a03f
parentd6a076d68c6b5d6a5800f3990a513facb7016dea
stmmac: intel: Fix kernel panic on pci probe

The commit "stmmac: intel: Adding ref clock 1us tic for LPI cntr"
introduced a regression which leads to the kernel panic duing loading
of the dwmac_intel module.

Move the code block after pci resources is obtained.

Fixes: b4c5f83ae3f3 ("stmmac: intel: Adding ref clock 1us tic for LPI cntr")
Cc: Voon Weifeng <weifeng.voon@intel.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@intel.com>
Link: https://lore.kernel.org/r/20201029093228.1741-1-vee.khee.wong@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c