mirror of
https://github.com/docker/docs.git
synced 2026-04-12 14:25:46 +07:00
Merge pull request #11771 from aneshas/11719-redundant-elses
Removed redundant elses
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user