Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6335627pxb; Mon, 8 Nov 2021 07:01:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJzyQgOL0N2cf6Ux02TUb263Oo9NtKP3VtCWnrQd+HoxZOMEUm7dFDuNqutUQGRbC9hDV7fW X-Received: by 2002:a5d:83c7:: with SMTP id u7mr357760ior.80.1636383703595; Mon, 08 Nov 2021 07:01:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636383703; cv=none; d=google.com; s=arc-20160816; b=RE8TPs+D3Rype0xbeksEFdztjwU1dVTX5/itIYkMe7zXjqATKlMwO3UQzzpYkVKk4g kasqDbibj3xolQAk8IWPUKLwtK1z9GC+sRJ6EQpxDa6ePejfLefVa0bkq62A1vxe5rvj 0zxDbOUsj3Zk21XwZGUn3D1annJ9Ljs7OQN0L/KR5h1eYmaCGd3H4BpJ8jLkdii4NdUI QslRbQBinyy64F4p+qz1OcwmkyOYYYYFLwNYaMUuaAK34EtRzt3Af0sds6Gk6KICeRhi vmMlR1B4UwGZiGkNBDpKjPufykwdxSrEWPGWZ6uJiJQ5kCAlI52hpJHErFtC8JR8Qvmv uXXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=1CKqF0DE8Be0vB1u1hCxGErnnln1gggVNvwi7ZjWJYY=; b=s5Eh2SXzylhvBUDZ0Cj64FQMwZymRc5xvsR/JGNR5nXZ9+Yh2b8ExyHpsNsuYA3gmb fwRXGJKkNDsB7XXXsJimLKM6R7Soeqjuoy1hbdzKwarRqKSX8+t1H1hO62cS7VmEJ1LM rX4opbT1wSuLGEMAWlFsNaHpGJMlQw797ckPaJU4huKWaC5lPFrgaJxAKmiwBlfsUrdL PdvIb7Il1zW985+WJ3NQYMayLSBzWSVGv7mpgPQXYd/xafOXmwG4qRQoNQvQX/+/5gjI qWQUKtokZA5GiwVIwJK5BmcrPpI6euA0DiHEKjg5wtqEYgmRXrJmzw/3hbwjJGJV0NRF Ir8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Y2KW/uok"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b14si33185676ilv.20.2021.11.08.07.01.25; Mon, 08 Nov 2021 07:01:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="Y2KW/uok"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238619AbhKHKPd (ORCPT + 99 others); Mon, 8 Nov 2021 05:15:33 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38212 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231913AbhKHKO4 (ORCPT ); Mon, 8 Nov 2021 05:14:56 -0500 Received: from zn.tnic (p200300ec2f33110088892b77bd117736.dip0.t-ipconnect.de [IPv6:2003:ec:2f33:1100:8889:2b77:bd11:7736]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 29D9B1EC04DF; Mon, 8 Nov 2021 11:12:12 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1CKqF0DE8Be0vB1u1hCxGErnnln1gggVNvwi7ZjWJYY=; b=Y2KW/uok9k083wPWd+LGCZ4Ee3hUJbEvZMNHddmCdMXlFKLsDJT7vveXIXQTO647NITs3C J5lucPD3q0bOJwu55O4iDw3VLHz0krF1jsaPHa04RCrPpseyDOR3PAavfJdMjxv2wchwEi +E77VBKRX5oMStFhA2QAR+/BeYY3B6M= From: Borislav Petkov To: LKML Subject: [PATCH v0 05/42] dca: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:20 +0100 Message-Id: <20211108101157.15189-6-bp@alien8.de> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20211108101157.15189-1-bp@alien8.de> References: <20211108101157.15189-1-bp@alien8.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Borislav Petkov Avoid homegrown notifier registration checks. No functional changes. Signed-off-by: Borislav Petkov --- drivers/dca/dca-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dca/dca-core.c b/drivers/dca/dca-core.c index c40c2ebfdae9..3e8f52214652 100644 --- a/drivers/dca/dca-core.c +++ b/drivers/dca/dca-core.c @@ -428,7 +428,8 @@ EXPORT_SYMBOL_GPL(unregister_dca_provider); */ void dca_register_notify(struct notifier_block *nb) { - blocking_notifier_chain_register(&dca_provider_chain, nb); + if (blocking_notifier_chain_register(&dca_provider_chain, nb)) + pr_warn("dca provider notifier already registered\n"); } EXPORT_SYMBOL_GPL(dca_register_notify); -- 2.29.2