]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commit60e3b05c7179b76820cc9ed919780fc63fbfe259
tree6e8a3ea03a284fdfdc5bd0a876d5d101e8ca462f
parente15ac00ef5ea34cb4171d3e63c6b9ed25ceba690
fpga: altera-cvp: fix 'bad IO access' on x86_64

BugLink: https://bugs.launchpad.net/bugs/1837664
[ Upstream commit 187fade88ca0ff2df9d360ca751d948d73db7095 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/fpga/altera-cvp.c