sysfs: checking for NULL instead of ERR_PTR