aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/main.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c
index 678558b502fc..9c5fbad513f8 100644
--- a/drivers/net/ethernet/mellanox/mlx4/main.c
+++ b/drivers/net/ethernet/mellanox/mlx4/main.c
@@ -986,6 +986,9 @@ static int map_bf_area(struct mlx4_dev *dev)
986 resource_size_t bf_len; 986 resource_size_t bf_len;
987 int err = 0; 987 int err = 0;
988 988
989 if (!dev->caps.bf_reg_size)
990 return -ENXIO;
991
989 bf_start = pci_resource_start(dev->pdev, 2) + 992 bf_start = pci_resource_start(dev->pdev, 2) +
990 (dev->caps.num_uars << PAGE_SHIFT); 993 (dev->caps.num_uars << PAGE_SHIFT);
991 bf_len = pci_resource_len(dev->pdev, 2) - 994 bf_len = pci_resource_len(dev->pdev, 2) -