lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240211151113.4171-1-d.dulov@aladdin.ru>
Date: Sun, 11 Feb 2024 07:11:13 -0800
From: Daniil Dulov <d.dulov@...ddin.ru>
To: Evgeniy Polyakov <zbr@...emap.net>
CC: Daniil Dulov <d.dulov@...ddin.ru>, Greg Kroah-Hartman
	<gregkh@...uxfoundation.org>, David Fries <David@...es.net>,
	<linux-kernel@...r.kernel.org>, <lvc-project@...uxtesting.org>
Subject: [PATCH] w1: remove redundant NULL check

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@...ddin.ru>
---
 drivers/w1/w1_netlink.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ