Skip to content

Commit

Permalink
net/mlx4: clean up a type issue
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dan Carpenter authored and Jakub Kicinski committed Jul 27, 2023
1 parent 707116b commit bc758ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/mellanox/mlx4/mcg.c
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ static bool check_duplicate_entry(struct mlx4_dev *dev, u8 port,
struct mlx4_promisc_qp *dqp, *tmp_dqp;

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

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

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

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

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

Expand Down

0 comments on commit bc758ad

Please sign in to comment.