habanalabs: unmap PCI bars upon iATU failure
authorOfir Bitton <obitton@habana.ai>
Thu, 16 Jul 2020 10:33:52 +0000 (13:33 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Sep 2020 17:14:08 +0000 (19:14 +0200)
commitb18c6071868cef30e178bdae8f4479e162ec0747
treebcbfac6e7fa16c0508193310de22bb6c7fb25dcd
parent4e2beff0b638f17ba9a8c6d15aff986f83213e06
habanalabs: unmap PCI bars upon iATU failure

[ Upstream commit f1aae40e8dbd2655e3b10cae381a1e8292b19d57 ]

In case the driver fails to configure the PCI controller iATU, it needs to
unmap the PCI bars before exiting so if the driver is removed, the bars
won't be left mapped.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/habanalabs/pci.c