/* This function returns a pointer to the superblock node or a negative error code.  */
struct ubifs_sb_node* ubifs_read_sb_node(struct ubifs_info *c)
/* This function returns a pointer to the superblock node or a negative error code.  */
struct ubifs_sb_node* ubifs_read_sb_node(struct ubifs_info *c)
{
	struct ubifs_sb_node *sup;
	int err;
	sup = kmalloc(ALIGN(UBIFS_SB_NODE_SZ, c->min_io_size), GFP_NOFS);
	if (!sup)
		return ERR_PTR(-ENOMEM);
	err = ubifs_read_node(c, sup, UBIFS_SB_NODE, UBIFS_SB_NODE_SZ,
			      UBIFS_SB_LNUM, 0);
	if (err) {
		kfree(sup);
		return ERR_PTR(err);
	}
	return sup;
}