diff --git a/integration/plugin/graphdriver/external_test.go b/integration/plugin/graphdriver/external_test.go
index <HASH>..<HASH> 100644
--- a/integration/plugin/graphdriver/external_test.go
+++ b/integration/plugin/graphdriver/external_test.go
@@ -424,8 +424,8 @@ func TestGraphdriverPluginV2(t *testing.T) {
 		RemoteRef:            plugin,
 		AcceptAllPermissions: true,
 	})
-	defer responseReader.Close()
 	assert.NilError(t, err)
+	defer responseReader.Close()
 	// ensure it's done by waiting for EOF on the response
 	_, err = io.Copy(ioutil.Discard, responseReader)
 	assert.NilError(t, err)
TestGraphdriverPluginV2: SA<I>: should check returned error before deferring (staticcheck)

```
integration/plugin/graphdriver/external_test.go:<I>:2: SA<I>: should check returned error before deferring responseReader.Close() (staticcheck)
```