From 3550131b5eeb7b968d8692b98a5784e33e8de319 Mon Sep 17 00:00:00 2001 From: Anes Hasicic Date: Wed, 25 Mar 2015 23:34:00 +0100 Subject: [PATCH] Removed redundant elses Signed-off-by: Anes Hasicic --- devicemapper/devmapper.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/devicemapper/devmapper.go b/devicemapper/devmapper.go index f3b55c8..1d45d05 100644 --- a/devicemapper/devmapper.go +++ b/devicemapper/devmapper.go @@ -586,9 +586,10 @@ func CreateDevice(poolName string, deviceId int) error { // Caller wants to know about ErrDeviceIdExists so that it can try with a different device id. if dmSawExist { return ErrDeviceIdExists - } else { - return fmt.Errorf("Error running CreateDevice %s", err) } + + return fmt.Errorf("Error running CreateDevice %s", err) + } return nil } @@ -681,9 +682,10 @@ func CreateSnapDevice(poolName string, deviceId int, baseName string, baseDevice // Caller wants to know about ErrDeviceIdExists so that it can try with a different device id. if dmSawExist { return ErrDeviceIdExists - } else { - return fmt.Errorf("Error running DeviceCreate (createSnapDevice) %s", err) } + + return fmt.Errorf("Error running DeviceCreate (createSnapDevice) %s", err) + } if doSuspend {