[PATCH] nvme-hwmon: don't return errors from nvme_hwmon_init

Keith Busch kbusch at kernel.org
Tue Oct 18 08:15:08 PDT 2022


On Tue, Oct 18, 2022 at 04:58:08PM +0200, Christoph Hellwig wrote:
> @@ -3261,11 +3261,8 @@ int nvme_init_ctrl_finish(struct nvme_ctrl *ctrl)
>  	if (ret < 0)
>  		return ret;
>  
> -	if (!ctrl->identified && !nvme_discovery_ctrl(ctrl)) {
> -		ret = nvme_hwmon_init(ctrl);
> -		if (ret < 0)
> -			return ret;
> -	}
> +	if (!ctrl->identified && !nvme_discovery_ctrl(ctrl))
> +		nvme_hwmon_init(ctrl);

We still need to check for < 0 since nvme_hwmon_init() sends an admin
command. If the admin command times out, the controller is reset and
-EINTR is returned, indicating we have to abort initialization. All
other errors should be ignored, though, since the controller remains
usable.



More information about the Linux-nvme mailing list