]> 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)
commit1919b9ef10f53a3f2cc8a806ee09e08526fbc4e4
tree2cf63efdbc0ca6650fd61081161a92557b8948b8
parent135932430e7d4376ce70cc24ada1df313034b219
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: 39b27cb78 ("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