From c18fbdb29ab2df3767fb3b7ac49d669f9f48846f Mon Sep 17 00:00:00 2001 From: Anis Elleuch Date: Thu, 16 Jan 2020 20:27:50 +0100 Subject: [PATCH] posix: Remove a non needed nil check in DiskInfo() (#8830) posix.DiskInfo() returns errFaultyDisk when posix is nil, but there is no way that this would happen any time, therefore removing un-needed code. --- cmd/posix.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmd/posix.go b/cmd/posix.go index ce08bb940..bf622f3d1 100644 --- a/cmd/posix.go +++ b/cmd/posix.go @@ -440,10 +440,6 @@ func (s *posix) DiskInfo() (info DiskInfo, err error) { } }() - if s == nil { - return info, errFaultyDisk - } - if atomic.LoadInt32(&s.ioErrCount) > maxAllowedIOError { return info, errFaultyDisk }