RDMA/iwpm: Remove redundant initialization of pointer err_str
Subsystems (2)
PATCH 1/1 RDMA/iwpm: Remove redundant initialization of pointer err_str
From: Colin Ian King <[email protected]>
The pointer err_str is being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.
Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>
--- drivers/infiniband/core/iwpm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/core/iwpm_util.c +1 -1
@@ -762,7 +762,7 @@ int iwpm_send_hello(u8 nl_client, int iwpm_pid, u16 abi_version) {struct sk_buff *skb =NULL ;struct nlmsghdr *nlh; -const char *err_str ="" ; +const char *err_str;int ret = -EINVAL ; skb =iwpm_create_nlmsg (RDMA_NL_IWPM_HELLO , &nlh, nl_client);
Signature · 1 line
2.32.0
Quoted 11 lines · Colin King
From: Colin Ian King <[email protected]>
The pointer
err_stris being initialized with a value that is never read, it is being updated later on. The assignment is redundant and can be removed.Addresses-Coverity: ("Unused value")
Signed-off-by Colin Ian King <[email protected]>--- drivers/infiniband/core/iwpm_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason