mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
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: Prarit Bhargava <prarit@redhat.com> Cc: Paul Menage <menage@google.com> Cc: Li Zefan <lizf@cn.fujitsu.com> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
cbf978bfb1
commit
5fda1bd5b8
2 changed files with 2 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -1390,7 +1390,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 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue