diff --git a/drivers/bus/moxtet.c b/drivers/bus/moxtet.c
index baccf76093572e6dcba8efc14576cd127f05ea85..36cf13eee6b8ba9af71747cc6bd2e0e7eab0a01b 100644
--- a/drivers/bus/moxtet.c
+++ b/drivers/bus/moxtet.c
@@ -514,7 +514,7 @@ static ssize_t output_write(struct file *file, const char __user *buf,
 	struct moxtet *moxtet = file->private_data;
 	u8 bin[TURRIS_MOX_MAX_MODULES];
 	u8 hex[sizeof(bin) * 2 + 1];
-	size_t res;
+	ssize_t res;
 	loff_t dummy = 0;
 	int err, i;