Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6361409pxb; Mon, 8 Nov 2021 07:23:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJxO+Zq5sc54a+zU60Sb9NbabFzwlfaw93s3wRyOQoeqRGL52pMZhuadtzVMUUwC5ak7BXBy X-Received: by 2002:a50:9b06:: with SMTP id o6mr492400edi.284.1636385037688; Mon, 08 Nov 2021 07:23:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636385037; cv=none; d=google.com; s=arc-20160816; b=f50a30dT8bS/5SIVtWeow25DHCoWqs9mwcBmO8CbwipcTp2F0YRIfp2ZtgO6hPQoZ7 IGsXUHqnPTn5FNxIrAqu8S7bFAkK7VOvSur+FqORwAcGGe3cm8oq0Jsjvq2PB0mFyPyw h3hfXo6lmakcviCJmJBck/Zlj9qJXGxKXNn+PnNMqjk9pmrXZV38W7egCPiVy1/mpiNp UVsfwCQG0Pg1n0qbZjbRPMPpKJ6sGvuZsoD1mzUx8TsQF0p3MkfvALhffOvQrDiuZ1/I siqs1lWtTvmO++B9plof1yjlFS0mocY8ppm5/pe6PSJwd50/bazCQ0tBvh4jExjEs4hy i6pQ== 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=tBs2L8hWR0xYGSYsNcuF1/5/ldlnD+5PTmvcTf/W4Tg=; b=Nq9kIngKPPgxnS1TREWifLw7V0KyvQdToTeFoclw96jHXuRsED20TqvHhqiGZoLIwB MfftY9sxn6DREMD7ickYUG+ehq1AgrURzvffccV5iRURYtkKXpw1zxM0hqh6SR8hnIJI WZ8QHkkKoF0Ge1SK4+jHNlIgmrz4cyxHWJbinQCWLkWTWkURTi3jHtdPyqQMMU3K/Xwd 5qq+FP0W/2t+RvH35vgvpxaRTuLDqN8khynp8dIfidzARhzK/p6+JjwAiTkDAfptf2BS M6cSO+B07dwzKk4ZnUIj6EGlAZWtvCYAGCFXHrjr1v7K9u100PViSaKMsPlt1xoFk79d psXw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=BTe1imLK; 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 gs44si24651090ejc.572.2021.11.08.07.23.31; Mon, 08 Nov 2021 07:23:57 -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=BTe1imLK; 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 S237801AbhKHKTA (ORCPT + 99 others); Mon, 8 Nov 2021 05:19:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238628AbhKHKPf (ORCPT ); Mon, 8 Nov 2021 05:15:35 -0500 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC571C06120B for ; Mon, 8 Nov 2021 02:12:31 -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 452BD1EC051E; Mon, 8 Nov 2021 11:12:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366350; 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=tBs2L8hWR0xYGSYsNcuF1/5/ldlnD+5PTmvcTf/W4Tg=; b=BTe1imLKRDxct4JHKDpr11I57bb07Dw/mMDg+l/s4HXk0TmHNrhpHqwf+5/3+cfrp8/mJn wM+60SMpFNCWhMQh6mjdlOC7/9Q0t5rwKOUKPo1D8A3Dk/7O3G5DYfASQVASTzrtg/pmTr ONf0osyjECZXRLcNgLDjCrCiZpnhllk= From: Borislav Petkov To: LKML Cc: bcm-kernel-feedback-list@broadcom.com Subject: [PATCH v0 28/42] soc: bcm: brcmstb: pm: pm-arm: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:43 +0100 Message-Id: <20211108101157.15189-29-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: bcm-kernel-feedback-list@broadcom.com --- drivers/soc/bcm/brcmstb/pm/pm-arm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/soc/bcm/brcmstb/pm/pm-arm.c b/drivers/soc/bcm/brcmstb/pm/pm-arm.c index 3cbb165d6e30..f80068ec57cb 100644 --- a/drivers/soc/bcm/brcmstb/pm/pm-arm.c +++ b/drivers/soc/bcm/brcmstb/pm/pm-arm.c @@ -802,8 +802,9 @@ static int brcmstb_pm_probe(struct platform_device *pdev) goto out; } - atomic_notifier_chain_register(&panic_notifier_list, - &brcmstb_pm_panic_nb); + if (atomic_notifier_chain_register(&panic_notifier_list, + &brcmstb_pm_panic_nb)) + pr_warn("Panic notifier already registered\n"); pm_power_off = brcmstb_pm_poweroff; suspend_set_ops(&brcmstb_pm_ops); -- 2.29.2