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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240103021746.5337-1-jiapeng.chong@linux.alibaba.com>
Date: Wed,  3 Jan 2024 10:17:46 +0800
From: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
To: jorge.lopez2@...com
Cc: hdegoede@...hat.com,
	ilpo.jarvinen@...ux.intel.com,
	platform-driver-x86@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>,
	Abaci Robot <abaci@...ux.alibaba.com>
Subject: [PATCH] platform/x86: hp-bioscfg: Remove useless else

The assignment of the else and if branches is the same, so the else
here is redundant, so we remove it.

./drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c:544:3-5: WARNING: possible condition with no effect (if == else).

Reported-by: Abaci Robot <abaci@...ux.alibaba.com>
Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7817
Signed-off-by: Jiapeng Chong <jiapeng.chong@...ux.alibaba.com>
---
 .../platform/x86/hp/hp-bioscfg/passwdobj-attributes.c  | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
index f7efe217a4bb..18c60a847842 100644
--- a/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
+++ b/drivers/platform/x86/hp/hp-bioscfg/passwdobj-attributes.c
@@ -540,14 +540,8 @@ void hp_exit_password_attributes(void)
 		struct kobject *attr_name_kobj =
 			bioscfg_drv.password_data[instance_id].attr_name_kobj;
 
-		if (attr_name_kobj) {
-			if (!strcmp(attr_name_kobj->name, SETUP_PASSWD))
-				sysfs_remove_group(attr_name_kobj,
-						   &password_attr_group);
-			else
-				sysfs_remove_group(attr_name_kobj,
-						   &password_attr_group);
-		}
+		if (attr_name_kobj)
+			sysfs_remove_group(attr_name_kobj, &password_attr_group);
 	}
 	bioscfg_drv.password_instances_count = 0;
 	kfree(bioscfg_drv.password_data);
-- 
2.20.1.7.g153144c


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ