diff options
author | Christoph Hellwig <hch@lst.de> | 2022-10-18 16:55:55 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2022-10-19 12:42:58 +0200 |
commit | 6b8cf94005187952f794c0c4ed3920a1e8accfa3 (patch) | |
tree | a11e6ba1ce89a371e46394c033a5a35349e602f9 /drivers/nvme/host/core.c | |
parent | 6ff5ba97960821fb872ad981eb30374f5cee1fd9 (diff) | |
download | linux-6b8cf94005187952f794c0c4ed3920a1e8accfa3.tar.bz2 |
nvme-hwmon: consistently ignore errors from nvme_hwmon_init
An NVMe controller works perfectly fine even when the hwmon
initialization fails. Stop returning errors that do not come from a
controller reset from nvme_hwmon_init to handle this case consistently.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Serge Semin <fancer.lancer@gmail.com>
Diffstat (limited to 'drivers/nvme/host/core.c')
-rw-r--r-- | drivers/nvme/host/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c index 9cbe7854d488..dc4220600585 100644 --- a/drivers/nvme/host/core.c +++ b/drivers/nvme/host/core.c @@ -3262,8 +3262,12 @@ int nvme_init_ctrl_finish(struct nvme_ctrl *ctrl) return ret; if (!ctrl->identified && !nvme_discovery_ctrl(ctrl)) { + /* + * Do not return errors unless we are in a controller reset, + * the controller works perfectly fine without hwmon. + */ ret = nvme_hwmon_init(ctrl); - if (ret < 0) + if (ret == -EINTR) return ret; } |