Commit a9ec6bd1f7bccdc1304629f8fbb2e02035026307

Authored by Michal Schmidt
Committed by David S. Miller
1 parent 8427b2acfd

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: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 0 deletions Side-by-side Diff

drivers/net/ethernet/sfc/mcdi_mon.c
... ... @@ -222,6 +222,7 @@
222 222 attr->index = index;
223 223 attr->type = type;
224 224 attr->limit_value = limit_value;
  225 + sysfs_attr_init(&attr->dev_attr.attr);
225 226 attr->dev_attr.attr.name = attr->name;
226 227 attr->dev_attr.attr.mode = S_IRUGO;
227 228 attr->dev_attr.show = reader;