diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-07-29 19:54:26 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2013-07-31 17:12:07 -0400 |
commit | 281d1a9211986cfdccbefcd6128049a0a0d473b2 (patch) | |
tree | 7e8f8920e48b403d6cf0e904e5ec07c4cca3f6a2 /drivers/infiniband | |
parent | 3b2f64d00c46e1e4e9bd0bb9bb12619adac27a4b (diff) |
IB/mlx5: Fix error return code in init_one()
Fix to return a negative error code from the error handling case
instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx5/main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 8000fff4d444..b1cbf338bcf6 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c | |||
@@ -1426,7 +1426,8 @@ static int init_one(struct pci_dev *pdev, | |||
1426 | if (err) | 1426 | if (err) |
1427 | goto err_eqs; | 1427 | goto err_eqs; |
1428 | 1428 | ||
1429 | if (ib_register_device(&dev->ib_dev, NULL)) | 1429 | err = ib_register_device(&dev->ib_dev, NULL); |
1430 | if (err) | ||
1430 | goto err_rsrc; | 1431 | goto err_rsrc; |
1431 | 1432 | ||
1432 | err = create_umr_res(dev); | 1433 | err = create_umr_res(dev); |
@@ -1434,8 +1435,9 @@ static int init_one(struct pci_dev *pdev, | |||
1434 | goto err_dev; | 1435 | goto err_dev; |
1435 | 1436 | ||
1436 | for (i = 0; i < ARRAY_SIZE(mlx5_class_attributes); i++) { | 1437 | for (i = 0; i < ARRAY_SIZE(mlx5_class_attributes); i++) { |
1437 | if (device_create_file(&dev->ib_dev.dev, | 1438 | err = device_create_file(&dev->ib_dev.dev, |
1438 | mlx5_class_attributes[i])) | 1439 | mlx5_class_attributes[i]); |
1440 | if (err) | ||
1439 | goto err_umrc; | 1441 | goto err_umrc; |
1440 | } | 1442 | } |
1441 | 1443 | ||