Merge git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-watchdog
[firefly-linux-kernel-4.4.55.git] / kernel / power / main.c
index 2981af4ce7cbbce49314e2fb2fef9fa13496f41e..6c601f871964408e7df2b376dd69d86006103b0e 100644 (file)
@@ -37,8 +37,9 @@ EXPORT_SYMBOL_GPL(unregister_pm_notifier);
 
 int pm_notifier_call_chain(unsigned long val)
 {
-       return (blocking_notifier_call_chain(&pm_chain_head, val, NULL)
-                       == NOTIFY_BAD) ? -EINVAL : 0;
+       int ret = blocking_notifier_call_chain(&pm_chain_head, val, NULL);
+
+       return notifier_to_errno(ret);
 }
 
 /* If set, devices may be suspended and resumed asynchronously. */