w1: remove redundant NULL check

Message ID 20240211151113.4171-1-d.dulov@aladdin.ru
State New
Headers
Series w1: remove redundant NULL check |

Commit Message

Daniil Dulov Feb. 11, 2024, 3:11 p.m. UTC
  cmd cannot be null in w1_process_cb, thus remove redundant NULL check

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: 9fcbbac5ded4 ("w1: process w1 netlink commands in w1_process thread")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
---
 drivers/w1/w1_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/drivers/w1/w1_netlink.c b/drivers/w1/w1_netlink.c
index fa490aa4407c..402065a0432d 100644
--- a/drivers/w1/w1_netlink.c
+++ b/drivers/w1/w1_netlink.c
@@ -475,7 +475,7 @@  static void w1_process_cb(struct w1_master *dev, struct w1_async_cmd *async_cmd)
 		mlen -= len;
 	}
 
-	if (!cmd || err)
+	if (err)
 		w1_netlink_queue_status(node->block, node->msg, cmd, err);
 
 	/* ref taken in w1_search_slave or w1_search_master_id when building