]> asedeno.scripts.mit.edu Git - linux.git/commit
fpga: altera-cvp: fix 'bad IO access' on x86_64
authorAnatolij Gustschin <agust@denx.de>
Wed, 7 Nov 2018 17:51:45 +0000 (11:51 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 11 Nov 2018 20:58:27 +0000 (12:58 -0800)
commit187fade88ca0ff2df9d360ca751d948d73db7095
treea1fdcf21de6dc72cb7f1e0a68ead114f5be76702
parent1e5106031f298af4ad29c2eb866780d9a21e9ab4
fpga: altera-cvp: fix 'bad IO access' on x86_64

If mapping the CvP BAR fails, we still can configure the FPGA via
PCI config space access. In this case the iomap pointer is NULL.
On x86_64, passing NULL address to pci_iounmap() generates
"Bad IO access at port 0x0" output with stack call trace. Fix it.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Alan Tull <atull@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/fpga/altera-cvp.c