Skip to content

Commit fe2f25e

Browse files
amacaskillk8s-infra-cherrypick-robot
authored and
k8s-infra-cherrypick-robot
committed
Remove short variable declaration from validateStoragePools to allow for correct error to be passed to RecordOperationErrorMetrics
1 parent 85b2f6f commit fe2f25e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/gce-pd-csi-driver/controller.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ func (gceCS *GCEControllerServer) CreateVolume(ctx context.Context, req *csi.Cre
288288
gceAPIVersion = gce.GCEAPIVersionBeta
289289
}
290290

291-
if err := validateStoragePools(req, params, gceCS.CloudProvider.GetDefaultProject()); err != nil {
291+
err = validateStoragePools(req, params, gceCS.CloudProvider.GetDefaultProject())
292+
if err != nil {
292293
return nil, status.Errorf(codes.InvalidArgument, "CreateVolume failed to validate storage pools: %v", err)
293294
}
294295

0 commit comments

Comments
 (0)