all: remove redundant returns

Returns at the end of func bodies where the funcs have no return values
are pointless.

Change-Id: I0da5ea78671503e41a9f56dd770df8c919310ce5
Reviewed-on: https://go-review.googlesource.com/41093
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
diff --git a/src/bufio/scan_test.go b/src/bufio/scan_test.go
index 1bb1e88..2568225 100644
--- a/src/bufio/scan_test.go
+++ b/src/bufio/scan_test.go
@@ -169,7 +169,6 @@
 		}
 		buf.WriteByte('\n')
 	}
-	return
 }
 
 // Test the line splitter, including some carriage returns but no long lines.
diff --git a/src/encoding/gob/codec_test.go b/src/encoding/gob/codec_test.go
index 31c6aa6..c102059 100644
--- a/src/encoding/gob/codec_test.go
+++ b/src/encoding/gob/codec_test.go
@@ -47,7 +47,6 @@
 	if e := recover(); e != nil {
 		t.Error(e.(gobError).err) // Will re-panic if not one of our errors, such as a runtime error.
 	}
-	return
 }
 
 func newDecBuffer(data []byte) *decBuffer {
diff --git a/src/encoding/gob/error.go b/src/encoding/gob/error.go
index 8b5265c..949333b 100644
--- a/src/encoding/gob/error.go
+++ b/src/encoding/gob/error.go
@@ -39,5 +39,4 @@
 		}
 		*err = ge.err
 	}
-	return
 }
diff --git a/src/go/printer/nodes.go b/src/go/printer/nodes.go
index 08b8711..bea4ff2 100644
--- a/src/go/printer/nodes.go
+++ b/src/go/printer/nodes.go
@@ -887,8 +887,6 @@
 	default:
 		panic("unreachable")
 	}
-
-	return
 }
 
 func (p *printer) possibleSelectorExpr(expr ast.Expr, prec1, depth int) bool {
@@ -1268,8 +1266,6 @@
 	default:
 		panic("unreachable")
 	}
-
-	return
 }
 
 // ----------------------------------------------------------------------------
diff --git a/src/net/http/pprof/pprof.go b/src/net/http/pprof/pprof.go
index 6930df5..da15344 100644
--- a/src/net/http/pprof/pprof.go
+++ b/src/net/http/pprof/pprof.go
@@ -230,7 +230,6 @@
 		runtime.GC()
 	}
 	p.WriteTo(w, debug)
-	return
 }
 
 // Index responds with the pprof-formatted profile named by the request.
diff --git a/src/runtime/mgclarge.go b/src/runtime/mgclarge.go
index 3c2b12f..757e88d 100644
--- a/src/runtime/mgclarge.go
+++ b/src/runtime/mgclarge.go
@@ -240,7 +240,6 @@
 		}
 	}
 	root.removeNode(t)
-	return
 }
 
 // scavengetreap visits each node in the treap and scavenges the
diff --git a/src/runtime/runtime_test.go b/src/runtime/runtime_test.go
index 666bc0a..e9bc256 100644
--- a/src/runtime/runtime_test.go
+++ b/src/runtime/runtime_test.go
@@ -79,7 +79,6 @@
 			panic("bad recover")
 		}
 	}(1, 2, 3)
-	return
 }
 
 func BenchmarkDefer10(b *testing.B) {
diff --git a/src/text/template/parse/parse.go b/src/text/template/parse/parse.go
index 6060c6d..a91a544 100644
--- a/src/text/template/parse/parse.go
+++ b/src/text/template/parse/parse.go
@@ -202,7 +202,6 @@
 		}
 		*errp = e.(error)
 	}
-	return
 }
 
 // startParse initializes the parser, using the lexer.