diff --git a/mm/swapfile.c b/mm/swapfile.c
index 4d89c4c9336c89f0b10a57876161cd190ba353a3..6f25ece88c4ac0e7191d159200ac6fdb876921f8 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -1892,7 +1892,7 @@ static struct swap_info_struct *alloc_swap_info(void)
 SYSCALL_DEFINE2(swapon, const char __user *, specialfile, int, swap_flags)
 {
 	struct swap_info_struct *p;
-	char *name = NULL;
+	char *name;
 	struct block_device *bdev = NULL;
 	struct file *swap_file = NULL;
 	struct address_space *mapping;