提交 5fda1bd5 编写于 作者: P Prarit Bhargava 提交者: Linus Torvalds

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().
Signed-off-by: NPrarit Bhargava <prarit@redhat.com>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Acked-by: NPekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 cbf978bf
...@@ -243,12 +243,7 @@ static int __meminit page_cgroup_callback(struct notifier_block *self, ...@@ -243,12 +243,7 @@ static int __meminit page_cgroup_callback(struct notifier_block *self,
break; break;
} }
if (ret) return notifier_from_errno(ret);
ret = notifier_from_errno(ret);
else
ret = NOTIFY_OK;
return ret;
} }
#endif #endif
......
...@@ -1390,7 +1390,7 @@ static int __meminit slab_memory_callback(struct notifier_block *self, ...@@ -1390,7 +1390,7 @@ static int __meminit slab_memory_callback(struct notifier_block *self,
break; break;
} }
out: out:
return ret ? notifier_from_errno(ret) : NOTIFY_OK; return notifier_from_errno(ret);
} }
#endif /* CONFIG_NUMA && CONFIG_MEMORY_HOTPLUG */ #endif /* CONFIG_NUMA && CONFIG_MEMORY_HOTPLUG */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册