Skip to contentSkip to conversation

: mm: notifier_from_errno() cleanup

PATCH New Prarit Bhargava 1 participant 1 message Jan 12, 2011 Memory management

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : mm: notifier_from_errno() cleanup

While looking at some other notifier callbacks I noticed this code could use a simple cleanup.

notifier_from_errno() no longer needs the if (ret)/else conditional. That same conditional is now done in notifier_from_errno().

mm/page_cgroup.c +1 -6
index 5bffada..59a3cd4 100644
@@ -243,12 +243,7 @@ static int __meminit page_cgroup_callback(struct notifier_block *self,
 		break;
 	}
 
-	if (ret)
-		ret = notifier_from_errno(ret);
-	else
-		ret = NOTIFY_OK;
-
-	return ret;
+	return notifier_from_errno(ret);
 }
 
 #endif
mm/slab.c +1 -1
index 2640374..0164aa4 100644
@@ -1387,7 +1387,7 @@ static int __meminit slab_memory_callback(struct notifier_block *self,
 		break;
 	}
 out:
-	return ret ? notifier_from_errno(ret) : NOTIFY_OK;
+	return notifier_from_errno(ret);
 }
 #endif /* CONFIG_NUMA && CONFIG_MEMORY_HOTPLUG */
 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom policy in Canada: sign http://dissolvethecrtc.ca/
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>