hypervisor: cleanup valid method

The boolean return value is not necessary.

Signed-off-by: Peng Tao <bergwolf@gmail.com>
This commit is contained in:
Peng Tao
2018-05-13 18:22:41 +08:00
parent 18e6a6effc
commit 7f20dd89a3
4 changed files with 14 additions and 11 deletions

View File

@@ -173,8 +173,8 @@ func (q *qemu) qemuPath() (string, error) {
// init intializes the Qemu structure.
func (q *qemu) init(id string, hypervisorConfig *HypervisorConfig, vmConfig Resources, storage resourceStorage) error {
valid, err := hypervisorConfig.valid()
if valid == false || err != nil {
err := hypervisorConfig.valid()
if err != nil {
return err
}