On Sun, Jun 07, 2015 at 05:17:20PM -0700, Linus Torvalds wrote: > At most, it could be a "WARN_ON_ONCE()". Maybe even just silently > ignore the error. But BUG_ON()? Hell no.
Yeah, WARN_ON_ONCE() is the right one. The short history here is that sysfs_create_file() has __must_check on it which triggered this whole discussion. The rationale for having __must_check on the function was that the function's failure leads to userland visible behavior difference and it's very inviting to skip error handling on the function as file creation is often the last operation to be performed with no further dependency on it. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/