Skip to content

Commit bc758ad

Browse files
Dan Carpenterkuba-moo
authored andcommitted
net/mlx4: clean up a type issue
These functions returns type bool, not pointers, so return false instead of NULL. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Reviewed-by: Leon Romanovsky <leonro@nvidia.com> Reviewed-by: Tariq Toukan <tariqt@nvidia.com> Link: https://lore.kernel.org/r/52d0814a-7287-4160-94b5-ac7939ac61c6@moroto.mountain Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 707116b commit bc758ad

File tree

1 file changed

+2
-2
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+2
-2
lines changed

drivers/net/ethernet/mellanox/mlx4/mcg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
294294
struct mlx4_promisc_qp *dqp, *tmp_dqp;
295295

296296
if (port < 1 || port > dev->caps.num_ports)
297-
return NULL;
297+
return false;
298298

299299
s_steer = &mlx4_priv(dev)->steer[port - 1];
300300

@@ -375,7 +375,7 @@ static bool can_remove_steering_entry(struct mlx4_dev *dev, u8 port,
375375
bool ret = false;
376376

377377
if (port < 1 || port > dev->caps.num_ports)
378-
return NULL;
378+
return false;
379379

380380
s_steer = &mlx4_priv(dev)->steer[port - 1];
381381

0 commit comments

Comments
 (0)