/* This function returns zero if the request is correct, and %-EINVAL if not.  */
static int verify_rsvol_req(const struct ubi_device *ubi, const struct ubi_rsvol_req *req)
/* This function returns zero if the request is correct, and %-EINVAL if not.  */
static int verify_rsvol_req(const struct ubi_device *ubi, const struct ubi_rsvol_req *req)
{
	if (req->bytes <= 0)
		return -EINVAL;
	if (req->vol_id < 0 || req->vol_id >= ubi->vtbl_slots)
		return -EINVAL;
	return 0;
}