Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6335603pxb; Mon, 8 Nov 2021 07:01:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJxcFFK3ApkkU2Q6k3qwG+AI7NPD8s8/Syq7ns5G7yWJvNZXKhgPjf+HMB7hFfJ57kAemjjO X-Received: by 2002:a05:6e02:2143:: with SMTP id d3mr374968ilv.241.1636383702170; Mon, 08 Nov 2021 07:01:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636383702; cv=none; d=google.com; s=arc-20160816; b=I8OsVqe+QoNYQShEh4+qzOnWMYP9NijcRh9pdZ0KViT2MnYDgnxgWUgc1t8WrwFOl1 sxPtQOWNYQlJrliktb7RtAX0yDMJLKBpdVDENd3hNiyJiSQI5gKdW4IWFRRK3Yq3UHR1 FZaI1qBDPN9ilNQFY9LVOvqMNWYGa27t/i9rempVRJLzPUSE8QdrnRb3H0SIc0g33Db7 OWGMc/IhDCgoxeYcBBPvIiF/owCOjTCTozIXj/IFu/BDbNkSVB3jDJVXyhCEs/LE1QtZ 2qEOWxmm20l9vli7nebFkQC7XeWwpc9NRzL7ayfaqXOxVUG6tHed6eM4pga+adItb9QF 5bbw== 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:cc:to:from :dkim-signature; bh=ND2LAp5V1cntcC8R5Alkyf27iXFfBHan47izc4wnMQM=; b=baAUs8+Nv204Un94DcAu6ymbvMXigaI8CpomFcYu0Iolbo+h02BJ89s3VzYQW1zLIQ fbvdQqEnTMQZ0C+4FkA6pSiAiGPOvYArBxf7nini71IBHmiq4dVFLyBL4p+sB9dobMFn oi9QDI3Qwtr0ZuhXZc0m3YuYm8vLlpxzHAzPe4WaigJibeGNY1wPb7Xtn2wVgvg/MV/X ykbWCE/lKbDnIzVpeW8wZf9bdeeuEq1WgmOqMjjebm4xw2c5PbU3UQcr67QPz5STrG03 CluMwub4ZXWXx+M8LN9C4bWuq0I9hZsJatdKSuqWZJhXibw641EIGs1jFEx67gs4wJNW tlBg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=EGQc7Yry; 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 d1si38078770ilg.74.2021.11.08.07.01.25; Mon, 08 Nov 2021 07:01:42 -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=EGQc7Yry; 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 S230348AbhKHKPV (ORCPT + 99 others); Mon, 8 Nov 2021 05:15:21 -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 S231208AbhKHKOz (ORCPT ); Mon, 8 Nov 2021 05:14:55 -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 8FBB91EC04E4; Mon, 8 Nov 2021 11:12:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366330; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ND2LAp5V1cntcC8R5Alkyf27iXFfBHan47izc4wnMQM=; b=EGQc7Yry2RAR5SapNiYcK4fsmLV9Cz0AL6DHe24vwqSfXZCKqw9uPBeZlXRkPYKfLdQO2v ThnmTWk7RtlmeoysorTcja4Mz2N1X72PXPumoiSYch+ZRPoFZSQ9/+ytocg1QFAppS1ocO BoPQnK6zsahj2qibw4f7T6ZH5klZvQc= From: Borislav Petkov To: LKML Cc: openipmi-developer@lists.sourceforge.net Subject: [PATCH v0 03/42] impi: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:18 +0100 Message-Id: <20211108101157.15189-4-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 Cc: openipmi-developer@lists.sourceforge.net --- drivers/char/ipmi/ipmi_msghandler.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c index deed355422f4..9df360b53a90 100644 --- a/drivers/char/ipmi/ipmi_msghandler.c +++ b/drivers/char/ipmi/ipmi_msghandler.c @@ -5381,7 +5381,8 @@ static int ipmi_init_msghandler(void) timer_setup(&ipmi_timer, ipmi_timeout, 0); mod_timer(&ipmi_timer, jiffies + IPMI_TIMEOUT_JIFFIES); - atomic_notifier_chain_register(&panic_notifier_list, &panic_block); + if (atomic_notifier_chain_register(&panic_notifier_list, &panic_block)) + pr_warn("IPMI panic notifier already registered\n"); initialized = true; -- 2.29.2