pkg/term/term_linux_test: check returned error before deferring tty.Close() (staticcheck)
pkg/term/term_linux_test: check returned error before deferring tty.Close() (staticcheck)

Fix the following warnings from staticcheck linter:

```
pkg/term/term_linux_test.go:34:2: SA5001: should check returned error before deferring tty.Close() (staticcheck)
	defer tty.Close()
	^
pkg/term/term_linux_test.go:52:2: SA5001: should check returned error before deferring tty.Close() (staticcheck)
 	defer tty.Close()
	^
pkg/term/term_linux_test.go:67:2: SA5001: should check returned error before deferring tty.Close() (staticcheck)
	defer tty.Close()
	^
....
```

Signed-off-by: Kir Kolyshkin <3a017b8ddb3f9cf3e4a59978b004111bdeb97f08@gmail.com>
Signed-off-by: Sebastiaan van Stijn <64b2b6d12bfe4baae7dad3d018f8cbf6b0e7a044@gone.nl>

moul/docker,jvanz/docker,justincormack/docker,SvenDowideit/docker,justincormack/docker,estesp/docker,yosifkit/docker,AkihiroSuda/docker,jameszhan/docker,konstruktoid/docker-upstream,thaJeztah/docker,trebonian/docker,vdemeester/docker,moul/docker,djs55/docker,yongtang/docker,yongtang/docker,moul/docker,dims/docker,ibuildthecloud/docker,konstruktoid/docker-1,SvenDowideit/docker,vdemeester/docker,paralin/docker,Mokolea/docker,flavio/docker,jimjag/docker,AkihiroSuda/docker,trebonian/docker,trebonian/docker,moby/moby,nalind/docker,kojiromike/docker,trebonian/docker,bearstech/moby,ibuildthecloud/docker,kojiromike/docker,yosifkit/docker,thaJeztah/docker,kojiromike/docker,gnailuy/docker,jvanz/docker,bearstech/moby,konstruktoid/docker-upstream,bearstech/moby,mahak/docker,paralin/docker,dims/docker,yosifkit/docker,ibuildthecloud/docker,vdemeester/docker,Mokolea/docker,jimjag/docker,nawawi/docker,ibuildthecloud/docker,nawawi/docker,yosifkit/docker,pradipd/moby,paralin/docker,nawawi/docker,docker/docker,flavio/docker,paralin/docker,cpuguy83/docker,justincormack/docker,konstruktoid/docker-1,gnailuy/docker,nawawi/docker,konstruktoid/docker-1,mahak/docker,AkihiroSuda/docker,thaJeztah/docker,SvenDowideit/docker,gnailuy/docker,jameszhan/docker,Ramzec/docker,docker/docker,dims/docker,jimjag/docker,estesp/docker,nalind/docker,mahak/docker,moby/moby,jthelin/docker,pradipd/moby,djs55/docker,nalind/docker,ibuildthecloud/docker,bearstech/moby,flavio/docker,jameszhan/docker,konstruktoid/docker-upstream,pradipd/moby,moul/docker,Mokolea/docker,cpuguy83/docker,mahak/docker,flavio/docker,docker/docker,moby/moby,estesp/docker,thaJeztah/docker,Ramzec/docker,gnailuy/docker,djs55/docker,jimjag/docker,yongtang/docker,jvanz/docker,moby/moby,cpuguy83/docker,Mokolea/docker,Ramzec/docker,AkihiroSuda/docker,konstruktoid/docker-upstream,cpuguy83/docker,jthelin/docker,nalind/docker,Ramzec/docker