* [PATCH] RDMA/iwpm: Remove redundant initialization of pointer err_str
@ 2021-10-07 17:39 Colin King
2021-10-12 16:17 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2021-10-07 17:39 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe, linux-rdma; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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 <colin.king@canonical.com>
---
drivers/infiniband/core/iwpm_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/core/iwpm_util.c b/drivers/infiniband/core/iwpm_util.c
index 54f4feb604d8..358a2db38d23 100644
--- a/drivers/infiniband/core/iwpm_util.c
+++ b/drivers/infiniband/core/iwpm_util.c
@@ -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);
--
2.32.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] RDMA/iwpm: Remove redundant initialization of pointer err_str
2021-10-07 17:39 [PATCH] RDMA/iwpm: Remove redundant initialization of pointer err_str Colin King
@ 2021-10-12 16:17 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2021-10-12 16:17 UTC (permalink / raw)
To: Colin King; +Cc: Doug Ledford, linux-rdma, kernel-janitors, linux-kernel
On Thu, Oct 07, 2021 at 06:39:42PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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 <colin.king@canonical.com>
> ---
> drivers/infiniband/core/iwpm_util.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-10-12 16:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-07 17:39 [PATCH] RDMA/iwpm: Remove redundant initialization of pointer err_str Colin King
2021-10-12 16:17 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).