/* Returns zero on success or %-ENOENT on failure.  */
int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, struct notifier_block *n)
/* Returns zero on success or %-ENOENT on failure.  */
int blocking_notifier_chain_unregister(struct blocking_notifier_head *nh, struct notifier_block *n)
{
	int ret;
	if (unlikely(system_state == SYSTEM_BOOTING))
		return notifier_chain_unregister(&nh->head, n);
	down_write(&nh->rwsem);
	ret = notifier_chain_unregister(&nh->head, n);
	up_write(&nh->rwsem);
	return ret;
}