In the case of firewire core function, the caller of show functions for
device attributes is not only sysfs user, but also device initialization.
This commit adds memo about it against the typical assumption that the
functions are just dedicated to sysfs user.
Link: https://lore.kernel.org/lkml/20240318091759.678326-1-o-takashi@sakamocchi.jp/
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
if (value < 0)
return -ENOENT;
+ // Note that this function is also called by init_fw_attribute_group() with NULL pointer.
return buf ? sysfs_emit(buf, "0x%06x\n", value) : 0;
}
}
}
+ // Note that this function is also called by init_fw_attribute_group() with NULL pointer.
if (buf) {
bufsize = PAGE_SIZE - 1;
} else {