diff --git a/minichlink/pgm-wch-linke.c b/minichlink/pgm-wch-linke.c
index 51e2654f2ab90ae96d4ec6a8f7cd0321607bc073..36f414331dd20a48f11e406f7b5a7643e1cf30c7 100644
--- a/minichlink/pgm-wch-linke.c
+++ b/minichlink/pgm-wch-linke.c
@@ -375,7 +375,7 @@ static int LESetupInterface( void * d )
 		iss->sector_size = 256;
 
 		wch_link_command( dev, "\x81\x0d\x01\x03", 4, (int*)&transferred, rbuff, 1024 ); // Reply: Ignored, 820d050900300500
-	} else if( !result ) {
+	} else if( result < 0 ) {
 		fprintf( stderr, "Chip type not supported. Aborting...\n" );
 		return -1;
 	}