nfp: don't set aux pointers if ioremap failed
authorJakub Kicinski <jakub.kicinski@netronome.com>
Mon, 29 May 2017 00:52:55 +0000 (17:52 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 May 2017 15:27:04 +0000 (11:27 -0400)
commit09b857945b21706d432f6e4e1c9e5028be5f14ff
tree0f00754e236bb08349805d7c92eb64c00ebeec91
parent651e1f2f19995c7585f34688331cda4f88e8df47
nfp: don't set aux pointers if ioremap failed

If ioremap of PCIe ctrl memory failed we can still get to it through
PCI config space, therefore we allow ioremap() to fail.  When if fails,
however, we must leave all the IOMEM pointers as NULL.  Currently we
would calculate csr and em pointers, adding offsets to the potential
NULL value and therefore making the NULL-checks throughout the code
ineffective.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp6000_pcie.c