params: Remove redundant perm check in add_sysfs_param
PATCH 1/1 params: Remove redundant perm check in add_sysfs_param
There are two place where this function is called:
1. module_param_sysfs_setup //there is a check in this func
->add_sysfs_param
2. param_sysfs_builtin //there is a check in this func
->kernel_add_sysfs_param
->add_sysfs_paramSo remove redundant perm check in add_sysfs_param.
Signed-off-by Jiazi Li (transsion) <[email protected]>
--- kernel/params.c | 3 --- 1 file changed, 3 deletions(-)
kernel/params.c +0 -3
@@ -628,9 +628,6 @@ static __init_or_module int add_sysfs_param(struct module_kobject *mk,struct attribute **new_attrs;unsigned int i; -/* We don't bother calling this with invisible parameters. */ -BUG_ON (!kp->perm); -if (!mk->mp) {/* First allocation. */ mk->mp =kzalloc_obj (*mk->mp);
Signature · 1 line
2.49.0