From ad7bd8235f4c483dd237f35bdd486eba62179b28 Mon Sep 17 00:00:00 2001 From: Silvin Lubecki Date: Tue, 2 Apr 2019 11:07:11 +0200 Subject: [PATCH] opts/throttledevice.go:51:5: SA4003: unsigned values are never < 0 (staticcheck) Signed-off-by: Silvin Lubecki Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 296297190c55cee3b539c9b49ffa1c3708ed3e9b) Signed-off-by: Sebastiaan van Stijn --- opts/throttledevice.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/opts/throttledevice.go b/opts/throttledevice.go index 0959efae35..0bf5dd666f 100644 --- a/opts/throttledevice.go +++ b/opts/throttledevice.go @@ -48,9 +48,6 @@ func ValidateThrottleIOpsDevice(val string) (*blkiodev.ThrottleDevice, error) { if err != nil { return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) } - if rate < 0 { - return nil, fmt.Errorf("invalid rate for device: %s. The correct format is :. Number must be a positive integer", val) - } return &blkiodev.ThrottleDevice{Path: split[0], Rate: rate}, nil }