Removed redundant elses

Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
Upstream-commit: 1b6065de8f46edc8f36f6b3734fe64175e413dc3
Component: engine
This commit is contained in:
Anes Hasicic
2015-03-25 23:34:00 +01:00
parent a2c5155c6a
commit 6200bccb4a

View File

@ -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 {