IB/mlx5: Fix a NULL vs IS_ERR() check
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 20 Mar 2020 13:26:41 +0000 (16:26 +0300)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 24 Mar 2020 22:47:55 +0000 (19:47 -0300)
commita766fa84738f52f8227eb96aed4362725a82ccf2
tree2d7f80b0d110d391fb3bf9c29452ee5e841d0ace
parent5fb5186383bba84937887d73eb2f7ab8819e7a3e
IB/mlx5: Fix a NULL vs IS_ERR() check

The kzalloc() function returns NULL, not error pointers.

Fixes: 30f2fe40c72b ("IB/mlx5: Introduce UAPIs to manage packet pacing")
Link: https://lore.kernel.org/r/20200320132641.GF95012@mwanda
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/qos.c