diff --git a/coincellhell.c b/coincellhell.c
index ab45f64cc3b3a2baaecf880381d7c872873184c5..5b497f74047f6da19749765a5cd39cac6dc2aa13 100644
--- a/coincellhell.c
+++ b/coincellhell.c
@@ -86,7 +86,7 @@ int coincellhell_set_temperature(struct coincellhell* hell, uint8_t heater, floa
 	int ret;
 	while((ret = usbshm_writeControlTransfer(hell->priv, COMMAND_HEATER_SET_TEMPERATURE, NULL, 0, temperature*10.0f, heater)) == USBSHM_ERROR_AGAIN)
 		usleep(100000);
-	return ret < 0 ? 0 : -1;
+	return ret >= 0 ? 0 : -1;
 }
 
 int coincellhell_get_temperature_setpoint(struct coincellhell* hell, uint8_t heater, float* temperature)