RDMA/mlx4: Remove NULL check before dev_{put, hold}
authorzhang songyi <zhang.songyi@zte.com.cn>
Tue, 29 Nov 2022 07:54:07 +0000 (15:54 +0800)
committerLeon Romanovsky <leon@kernel.org>
Tue, 29 Nov 2022 09:22:12 +0000 (11:22 +0200)
commit2d6c66f5253e7d168a76048d18e1209c52f98a2b
tree0b1b55a8660070de7b0b6bb18d6bdc9a314d9f41
parentea5ef136e215fdef35f14010bc51fcd6686e6922
RDMA/mlx4: Remove NULL check before dev_{put, hold}

The call netdev_{put, hold} of dev_{put, hold} will check NULL,
so there is no need to check before using dev_{put, hold}.

Fix the following coccicheck warnings:
/drivers/infiniband/hw/mlx4/main.c:1311:2-10: WARNING:
WARNING  NULL check before dev_{put, hold} functions is not needed.

/drivers/infiniband/hw/mlx4/main.c:148:2-10: WARNING:
WARNING  NULL check before dev_{put, hold} functions is not needed.

/drivers/infiniband/hw/mlx4/main.c:1959:3-11: WARNING:
WARNING  NULL check before dev_{put, hold} functions is not needed.

/drivers/infiniband/hw/mlx4/main.c:1962:3-10: WARNING:
WARNING  NULL check before dev_{put, hold} functions is not needed.

Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
Link: https://lore.kernel.org/r/202211291554079687539@zte.com.cn
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx4/main.c