/* Returns a new struct ubi_vid_hdr on success. NULL indicates out of memory.  */
static struct ubi_vid_hdr* new_fm_vhdr(struct ubi_device *ubi, int vol_id)
/* Returns a new struct ubi_vid_hdr on success. NULL indicates out of memory.  */
static struct ubi_vid_hdr* new_fm_vhdr(struct ubi_device *ubi, int vol_id)
{
	struct ubi_vid_hdr *new;
	new = ubi_zalloc_vid_hdr(ubi, GFP_KERNEL);
	if (!new)
		goto out;
	new->vol_type = UBI_VID_DYNAMIC;
	new->vol_id = cpu_to_be32(vol_id);
	new->compat = UBI_COMPAT_DELETE;
out:
	return new;
}