nvme: return errors for hwmon init
authorKeith Busch <kbusch@kernel.org>
Thu, 17 Sep 2020 15:50:25 +0000 (08:50 -0700)
committerChristoph Hellwig <hch@lst.de>
Tue, 22 Sep 2020 15:49:55 +0000 (17:49 +0200)
commit59e330f8ff7ada7aa64fa422f6adf22a45152a7e
tree8d74c55da3ef67f291fe2f9959d8cdbc77aa5215
parent4a2dd2c798522859811dd520a059f982278be9d9
nvme: return errors for hwmon init

Initializing the nvme hwmon retrieves a log from the controller. If the
controller is broken, we need to return the appropriate error so that
subsequent initialization doesn't attempt to continue.

Reported-by: Tong Zhang <ztong0001@gmail.com>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/core.c
drivers/nvme/host/hwmon.c
drivers/nvme/host/nvme.h