From 0be5aa52e653ed645d960c533bf6874673c3dfef Mon Sep 17 00:00:00 2001 From: gmarek Date: Wed, 25 Feb 2015 08:06:45 +0100 Subject: [PATCH] Apply comments --- pkg/cloudprovider/gce/gce.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pkg/cloudprovider/gce/gce.go b/pkg/cloudprovider/gce/gce.go index da8f6d2ff70..9210b7f0320 100644 --- a/pkg/cloudprovider/gce/gce.go +++ b/pkg/cloudprovider/gce/gce.go @@ -178,8 +178,7 @@ func (gce *GCECloud) makeTargetPool(name, region string, hosts []string, affinit if err != nil { return "", err } - err = gce.waitForRegionOp(op, region) - if err != nil { + if err = gce.waitForRegionOp(op, region); err != nil { return "", err } link := fmt.Sprintf("https://www.googleapis.com/compute/v1/projects/%s/regions/%s/targetPools/%s", gce.projectID, region, name) @@ -259,10 +258,10 @@ func (gce *GCECloud) UpdateTCPLoadBalancer(name, region string, hosts []string) } op, err := gce.service.TargetPools.AddInstance(gce.projectID, region, name, req).Do() - gce.waitForRegionOp(op, region) if err != nil { return err } + err = gce.waitForRegionOp(op, region) return err }