net/mlx5: sparse: warning: Using plain integer as NULL pointer
authorSaeed Mahameed <saeedm@mellanox.com>
Wed, 22 Jan 2020 23:06:35 +0000 (15:06 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 26 Feb 2020 01:06:21 +0000 (17:06 -0800)
Return NULL instead of 0.

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/lib/dm.c

index e065c2f68f5a455914d57e3f6d650397ed1f7f1e..6cbccba56f7091f3b172b4bc3d16f89bdfa92ac3 100644 (file)
@@ -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)