Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6346202pxb; Mon, 8 Nov 2021 07:10:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwrCDBSuHheWfrYxJU1lkW9fKfNlmHTKW0VhG/z9SmnngYVM7/URq7Ksoakree2Ck/W+5+x X-Received: by 2002:a17:906:9459:: with SMTP id z25mr583132ejx.331.1636384214392; Mon, 08 Nov 2021 07:10:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636384214; cv=none; d=google.com; s=arc-20160816; b=UVA6tyOoQFP5w5mnZgLdtEptnmh3NbdmRCuvA/VNRkhakfbZOqTwC04dOFFV1I9oW1 q3bUUnkCelK+F53HfhNN1samDQvDUxHhYt//mTmnJlsZ8TmyhAB7BvCV2R0Ek8TAOiRD 6rIOob9KkNRwOix4WQUCTGBL8Hf3+7WlTVn1RO3gNOpHHV0Lwn1VZz0FsD8avIbi4HHp eEaWklO5pGNdLtbcdjdtJ975Q1y2GFu5cOJTtcEVBmSt8yhi0gcr8iUM5S420F7SpiEM yozDpIz3W9k+9usXD84oM+m9yL07nY3AAIEzNu0rNNVeBjrDF7wXd9cdKRiyto6p5t3/ +0xg== 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=09n/BxWcIS/wpoPlTHkUE3fbYzuqeKtXWX0IynIoGCU=; b=NLYm7FZHsDpppINbP5ATc8zS+13rAltWe//hR8+FotEg84i56qjFAOOxHZ4RYz5ejv R7n4ZLp1ig/47X/Z3Yd9XR8W4veNGNQS/1glq3nnohiGgW813fnD8jfrUclxfipt+7pl BWiqmyx/7wG/e/anoTMyf7xMuVUFHbtCsrsh24rslRVXD2PBbMt1+hrwBUrV6L28wlGq G9FaXQF5qzJRsaM1O4epy96brAElNzib98BnFXpeYx9Ojazvp7SY2VXHS3LuppDW9jNF /B/qK0taABL1XsfxJOfF3G35yM6cy5mihmgvsEl1Fi/OHS6lBX3vpr7h+VyGxBbG9d32 6EAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b="X+rE+/Sg"; 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 v16si36298792edc.159.2021.11.08.07.09.50; Mon, 08 Nov 2021 07:10:14 -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="X+rE+/Sg"; 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 S236181AbhKHKTr (ORCPT + 99 others); Mon, 8 Nov 2021 05:19:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238646AbhKHKPj (ORCPT ); Mon, 8 Nov 2021 05:15:39 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C1C91C061225; Mon, 8 Nov 2021 02:12:41 -0800 (PST) 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 157C81EC0532; Mon, 8 Nov 2021 11:12:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366360; 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=09n/BxWcIS/wpoPlTHkUE3fbYzuqeKtXWX0IynIoGCU=; b=X+rE+/Sg1vx8f2dmqU+VpPZVwVtgvV+qaNxy3EahuloQ6rhm5dAF/2rSn0PisDeOMZ3eqt 1vIksk0vJ9XD9aQV8Y4NSF9b0WJ9TMbMfUgRHhfxR1kqeWyhOjOl59/tF/w4LwjB2XYRK/ /CT7IrVHmQqEtn7sMEnTsm6+KInBSJM= From: Borislav Petkov To: LKML Cc: linux-edac@vger.kernel.org Subject: [PATCH v0 40/42] EDAC/altera: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:55 +0100 Message-Id: <20211108101157.15189-41-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: linux-edac@vger.kernel.org --- drivers/edac/altera_edac.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/edac/altera_edac.c b/drivers/edac/altera_edac.c index 3a6d2416cb0f..49fa7ae77ba3 100644 --- a/drivers/edac/altera_edac.c +++ b/drivers/edac/altera_edac.c @@ -2125,8 +2125,10 @@ static int altr_edac_a10_probe(struct platform_device *pdev) int dberror, err_addr; edac->panic_notifier.notifier_call = s10_edac_dberr_handler; - atomic_notifier_chain_register(&panic_notifier_list, - &edac->panic_notifier); + + if (atomic_notifier_chain_register(&panic_notifier_list, + &edac->panic_notifier)) + pr_warn("Panic notifier already registered\n"); /* Printout a message if uncorrectable error previously. */ regmap_read(edac->ecc_mgr_map, S10_SYSMGR_UE_VAL_OFST, -- 2.29.2