mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
platform/x86: hp: hp-bioscfg: remove redundant if statement
The if statement performs the same action if the strcmp result is true or false since there is identical code on both branches. The if statement is redundant and can be replaced with just one call to sysfs_remove_group. Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20241107113543.17137-1-colin.i.king@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
parent
a8e03d821d
commit
4ceb681f18
|
|
@ -531,14 +531,9 @@ 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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user