[SCSI] sysfs: add filter function to groups
This patch allows the various users of attribute_groups to selectively allow the appearance of group attributes. The primary consumer of this will be the transport classes in which we currently have elaborate attribute selection algorithms to do this same thing. Acked-by: Greg KH <greg@kroah.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
This commit is contained in:
@@ -472,7 +472,7 @@ param_sysfs_setup(struct module_kobject *mk,
|
||||
sizeof(mp->grp.attrs[0]));
|
||||
size[1] = (valid_attrs + 1) * sizeof(mp->grp.attrs[0]);
|
||||
|
||||
mp = kmalloc(size[0] + size[1], GFP_KERNEL);
|
||||
mp = kzalloc(size[0] + size[1], GFP_KERNEL);
|
||||
if (!mp)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
||||
|
Reference in New Issue
Block a user