The mlx5_is_reset_now_capable() function returns bool, not negative
error codes. So if fast teardown is not supported it should return
false instead of -EOPNOTSUPP.
Fixes:
92501fa6e421 ("net/mlx5: Ack on sync_reset_request only if PF can do reset_now")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
if (!MLX5_CAP_GEN(dev, fast_teardown)) {
mlx5_core_warn(dev, "fast teardown is not supported by firmware\n");
- return -EOPNOTSUPP;
+ return false;
}
err = pci_read_config_word(dev->pdev, PCI_DEVICE_ID, &dev_id);