From 03ba36c83d136a9d039b56f0a834e65676b58c22 Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Thu, 18 Feb 2016 12:26:57 +0200 Subject: throttle: Make throttle_is_valid() set errp The caller does not need to set it, and this will allow us to refactor this function later. Signed-off-by: Alberto Garcia Reviewed-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- blockdev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'blockdev.c') diff --git a/blockdev.c b/blockdev.c index 52aabf7b90..11a3139851 100644 --- a/blockdev.c +++ b/blockdev.c @@ -349,9 +349,7 @@ static bool check_throttle_config(ThrottleConfig *cfg, Error **errp) return false; } - if (!throttle_is_valid(cfg)) { - error_setg(errp, "bps/iops/max values must be within [0, %lld]", - THROTTLE_VALUE_MAX); + if (!throttle_is_valid(cfg, errp)) { return false; } -- cgit v1.2.3-55-g7522