Signed-off-by: Anes Hasicic <anes.hasicic@gmail.com>
Anes Hasicic authored on 2015/03/26 07:34:00... | ... |
@@ -586,9 +586,10 @@ func CreateDevice(poolName string, deviceId int) error { |
586 | 586 |
// Caller wants to know about ErrDeviceIdExists so that it can try with a different device id. |
587 | 587 |
if dmSawExist { |
588 | 588 |
return ErrDeviceIdExists |
589 |
- } else { |
|
590 |
- return fmt.Errorf("Error running CreateDevice %s", err) |
|
591 | 589 |
} |
590 |
+ |
|
591 |
+ return fmt.Errorf("Error running CreateDevice %s", err) |
|
592 |
+ |
|
592 | 593 |
} |
593 | 594 |
return nil |
594 | 595 |
} |
... | ... |
@@ -681,9 +682,10 @@ func CreateSnapDevice(poolName string, deviceId int, baseName string, baseDevice |
681 | 681 |
// Caller wants to know about ErrDeviceIdExists so that it can try with a different device id. |
682 | 682 |
if dmSawExist { |
683 | 683 |
return ErrDeviceIdExists |
684 |
- } else { |
|
685 |
- return fmt.Errorf("Error running DeviceCreate (createSnapDevice) %s", err) |
|
686 | 684 |
} |
685 |
+ |
|
686 |
+ return fmt.Errorf("Error running DeviceCreate (createSnapDevice) %s", err) |
|
687 |
+ |
|
687 | 688 |
} |
688 | 689 |
|
689 | 690 |
if doSuspend { |