Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9ec6bd1 authored by Michal Schmidt's avatar Michal Schmidt Committed by David S. Miller
Browse files

sfc: initialize dynamic sysfs attributes for lockdep



Dynamically allocated sysfs attributes must be initialized using
sysfs_attr_init(), otherwise lockdep complains:
BUG: key <address> not in .data!

Signed-off-by: default avatarMichal Schmidt <mschmidt@redhat.com>
Acked-by: default avatarBen Hutchings <bhutchings@solarflare.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8427b2ac
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -222,6 +222,7 @@ efx_mcdi_mon_add_attr(struct efx_nic *efx, const char *name,
	attr->index = index;
	attr->type = type;
	attr->limit_value = limit_value;
	sysfs_attr_init(&attr->dev_attr.attr);
	attr->dev_attr.attr.name = attr->name;
	attr->dev_attr.attr.mode = S_IRUGO;
	attr->dev_attr.show = reader;