diff --git a/api-put-object-streaming.go b/api-put-object-streaming.go
index <HASH>..<HASH> 100644
--- a/api-put-object-streaming.go
+++ b/api-put-object-streaming.go
@@ -171,7 +171,7 @@ func (c *Client) putObjectMultipartStreamFromReadAt(ctx context.Context, bucketN
 				}
 
 				n, rerr := readFull(io.NewSectionReader(reader, readOffset, partSize), partsBuf[w-1][:partSize])
-				if rerr != nil && rerr != io.ErrUnexpectedEOF && err != io.EOF {
+				if rerr != nil && rerr != io.ErrUnexpectedEOF && rerr != io.EOF {
 					uploadedPartsCh <- uploadedPartRes{
 						Error: rerr,
 					}
fix cond expression referring wrong error variable (#<I>)