]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-pci: fix CMB sysfs file removal in reset path
authorMax Gurtovoy <maxg@mellanox.com>
Sat, 29 Jul 2017 22:45:08 +0000 (01:45 +0300)
committerChristoph Hellwig <hch@lst.de>
Thu, 10 Aug 2017 09:19:06 +0000 (11:19 +0200)
commit1c78f7735b2bdd0afbe5d14c5c8b6d8d381b6f13
tree2cf63efdbc0ca6650fd61081161a92557b8948b8
parent507384209371fc25cab203b95e7bdf50e58b47d5
nvme-pci: fix CMB sysfs file removal in reset path

Currently we create the sysfs entry even if we fail mapping
it. In that case, the unmapping will not remove the sysfs created
file. There is no good reason to create a sysfs entry for a non
working CMB and show his characteristics.

Fixes: f63572dff ("nvme: unmap CMB and remove sysfs file in reset path")
Signed-off-by: Max Gurtovoy <maxg@mellanox.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/pci.c