diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index cb80a7703d58ea3fcbed6f45f7353c02209a1db8..1fb213f379a5b6bdaa296086d75c23447032e759 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -132,7 +132,7 @@ ssize_t read_from_oldmem(struct iov_iter *iter, size_t count,
 			 u64 *ppos, bool encrypted)
 {
 	unsigned long pfn, offset;
-	size_t nr_bytes;
+	ssize_t nr_bytes;
 	ssize_t read = 0, tmp;
 	int idx;