Skip to contentSkip to conversation

mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()

PATCH New Zhen Lei 1 participant 2 messages May 8, 2020

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

v2 cover mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()

v1 --> v2:
1. rename subject
2. give up adding an newline to seperate two labels

Zhen Lei (1):
mm/page_io.c: remove an unnecessary goto in
generic_swapfile_activate()

 mm/page_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
Signature · 1 line
2.26.0.106.g9fadedd
author
#1 lore raw

PATCH v2 1/1 mm/page_io.c: remove an unnecessary goto in generic_swapfile_activate()

This "goto" doesn't reduce any code, but bother the readers.

---
 mm/page_io.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
mm/page_io.c +1 -2
index 76965be1d40e..19d429abb2cc 100644
@@ -237,8 +237,7 @@ int generic_swapfile_activate(struct swap_info_struct *sis,
 	return ret;
 bad_bmap:
 	pr_err("swapon: swapfile has holes\n");
-	ret = -EINVAL;
-	goto out;
+	return -EINVAL;
 }
 
 /*
Signature · 1 line
2.26.0.106.g9fadedd