Skip to content

Commit

Permalink
net/mlx5: sparse: warning: Using plain integer as NULL pointer
Browse files Browse the repository at this point in the history
Return NULL instead of 0.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
  • Loading branch information
Saeed Mahameed committed Feb 26, 2020
1 parent 5edc4c7 commit 586ee9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ struct mlx5_dm *mlx5_dm_create(struct mlx5_core_dev *dev)
struct mlx5_dm *dm;

if (!(MLX5_CAP_GEN_64(dev, general_obj_types) & MLX5_GENERAL_OBJ_TYPES_CAP_SW_ICM))
return 0;
return NULL;

dm = kzalloc(sizeof(*dm), GFP_KERNEL);
if (!dm)
Expand Down

0 comments on commit 586ee9e

Please sign in to comment.