From d50e9d24be6ae410af7b5975f453456367a7b28c Mon Sep 17 00:00:00 2001
From: jacksoom <lifengliu1994@gmail.com>
Date: Fri, 19 Mar 2021 19:04:15 +0800
Subject: [PATCH] consensus/ethash: remove unnecessary variable definition
 (#22512)

---
 consensus/ethash/ethash.go | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/consensus/ethash/ethash.go b/consensus/ethash/ethash.go
index 550d99893..1afdc9381 100644
--- a/consensus/ethash/ethash.go
+++ b/consensus/ethash/ethash.go
@@ -537,7 +537,6 @@ func NewShared() *Ethash {
 
 // Close closes the exit channel to notify all backend threads exiting.
 func (ethash *Ethash) Close() error {
-	var err error
 	ethash.closeOnce.Do(func() {
 		// Short circuit if the exit channel is not allocated.
 		if ethash.remote == nil {
@@ -546,7 +545,7 @@ func (ethash *Ethash) Close() error {
 		close(ethash.remote.requestExit)
 		<-ethash.remote.exitCh
 	})
-	return err
+	return nil
 }
 
 // cache tries to retrieve a verification cache for the specified block number
-- 
GitLab