mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Removed redundant elses
Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
This commit is contained in:
parent
3d9cbf0e71
commit
1b6065de8f
1 changed files with 6 additions and 4 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue