diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-04 11:21:01 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-08-07 16:56:57 +0300 |
commit | 849b1955ade1c647234d6fadeb70377d9def01ca (patch) | |
tree | b083ac629f1574f4f2a26f0dfd18af892e5b2b7e /drivers/infiniband/hw/irdma | |
parent | 26b7d1a27167e7adf75b150755e05d2bc123ce55 (diff) | |
download | linux-849b1955ade1c647234d6fadeb70377d9def01ca.tar.xz |
RDMA: Remove unnecessary NULL values
The NULL initialization of the pointers assigned by kzalloc() first is
not necessary, because if the kzalloc() failed, the pointers will be
assigned NULL, otherwise it works as usual. so remove it.
Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
Link: https://lore.kernel.org/r/20230804082102.3361961-1-ruanjinjie@huawei.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/irdma')
-rw-r--r-- | drivers/infiniband/hw/irdma/verbs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c index 0ca5b88d82e8..660be7f13060 100644 --- a/drivers/infiniband/hw/irdma/verbs.c +++ b/drivers/infiniband/hw/irdma/verbs.c @@ -2865,8 +2865,8 @@ static struct irdma_mr *irdma_alloc_iwmr(struct ib_umem *region, enum irdma_memreg_type reg_type) { struct irdma_device *iwdev = to_iwdev(pd->device); - struct irdma_pbl *iwpbl = NULL; - struct irdma_mr *iwmr = NULL; + struct irdma_pbl *iwpbl; + struct irdma_mr *iwmr; unsigned long pgsz_bitmap; iwmr = kzalloc(sizeof(*iwmr), GFP_KERNEL); |