1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Fixed redundant else in GetDeviceStatus

Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
This commit is contained in:
Anes Hasicic 2015-03-25 09:53:04 +01:00
parent 65584318d2
commit e479e1c9f7

View file

@ -1549,13 +1549,15 @@ func (devices *DeviceSet) GetDeviceStatus(hash string) (*DevStatus, error) {
return nil, fmt.Errorf("Error activating devmapper device for '%s': %s", hash, err) return nil, fmt.Errorf("Error activating devmapper device for '%s': %s", hash, err)
} }
if sizeInSectors, mappedSectors, highestMappedSector, err := devices.deviceStatus(info.DevName()); err != nil { sizeInSectors, mappedSectors, highestMappedSector, err := devices.deviceStatus(info.DevName())
if err != nil {
return nil, err return nil, err
} else { }
status.SizeInSectors = sizeInSectors status.SizeInSectors = sizeInSectors
status.MappedSectors = mappedSectors status.MappedSectors = mappedSectors
status.HighestMappedSector = highestMappedSector status.HighestMappedSector = highestMappedSector
}
return status, nil return status, nil
} }