]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit271521850516baff68a59d11bb1392d09649b146
tree0f00754e236bb08349805d7c92eb64c00ebeec91
parent171ff4a5970071953ff0269de307b89042856e33
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