diff options
author | Ruan Jinjie <ruanjinjie@huawei.com> | 2023-08-04 10:21:01 +0200 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2023-08-07 15:56:57 +0200 |
commit | 849b1955ade1c647234d6fadeb70377d9def01ca (patch) | |
tree | b083ac629f1574f4f2a26f0dfd18af892e5b2b7e /drivers/infiniband/core | |
parent | IB/uverbs: Fix an potential error pointer dereference (diff) | |
download | linux-849b1955ade1c647234d6fadeb70377d9def01ca.tar.xz linux-849b1955ade1c647234d6fadeb70377d9def01ca.zip |
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/core')
-rw-r--r-- | drivers/infiniband/core/iwpm_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c index 358a2db38d23..eecb369898f5 100644 --- a/drivers/infiniband/core/iwpm_util.c +++ b/drivers/infiniband/core/iwpm_util.c @@ -307,7 +307,7 @@ get_remote_info_exit: struct iwpm_nlmsg_request *iwpm_get_nlmsg_request(__u32 nlmsg_seq, u8 nl_client, gfp_t gfp) { - struct iwpm_nlmsg_request *nlmsg_request = NULL; + struct iwpm_nlmsg_request *nlmsg_request; unsigned long flags; nlmsg_request = kzalloc(sizeof(struct iwpm_nlmsg_request), gfp); |