Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6343289pxb; Mon, 8 Nov 2021 07:07:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJxErz+NYI2p/GeGNJwYpjxRpmycGomYjaRrX3jAlAguslC8/n1PCWq7uP+SRCXCOj2axtgg X-Received: by 2002:a05:6512:108f:: with SMTP id j15mr115129lfg.237.1636384078223; Mon, 08 Nov 2021 07:07:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636384078; cv=none; d=google.com; s=arc-20160816; b=dPTv0SDctH+Wr0uFoZhX4/AWM3IQgSAJyydXcbXbo+VzL90oFj5jh8aTceBceiAwwZ IT7PZT6dcsZFgINMgRPLNRVl22LiYRgFnZiQ/eal2hP/sDhGITfxgBkRfggZMdo8KxrO X8wG9pLhn5oAX1nmxH1N5xoKsQuhcEko6ADfFO81m1YK251jemB0WfxHrDE6AWW2UaRp kjbQVXl4R/0ng6w6jjvgVt2L7js+1TITJJk2ATrG6TeKOjHPO8n6rjOP0CkJbfCfmGo/ Bh++FRHtYtdZmOAXWYrPWQafBmW38NvS3h5zb6BIVsCziIm3cv1oWjqioIXew8lUBxgE MJ+w== 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=pC+lbIlcGv1j3XkDfTSs0sRGhsbjTty6nFQwrtKjf0s=; b=M/JwmcwezWvClq+t/dufFI0fXXBrwpKYzQx/M5QUnTqFoY5deW/UhFuQg69yWYDcba vR/PkZCpuG6QLujjEBerXlZoKhGLcfDHYU0AbrySGe8zWi/JDvVmMJCTK4SBmgqh3Hz6 DOgctJIw2Urup1BFJEGfXie4VJWDTEM5XAdqGm3zfbsS9UGvxN4/CGolTEHNj9vHEjt7 jZgDB4aQTtnc4oTtfIEOMy9/2CZtTPDFUlmxX8lFj8S7mcjf2/jqwJOyQwNSyFSRrAPN hyvu9nvGL8FchdCk1XIm5Ja2F472cN4ebXcOU9v5xHF12yIPZtkGjywksQveXWscQHPL Du2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=Z9gIVV1V; 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 nc42si31960857ejc.54.2021.11.08.07.07.31; Mon, 08 Nov 2021 07:07:58 -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=Z9gIVV1V; 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 S238661AbhKHKQ6 (ORCPT + 99 others); Mon, 8 Nov 2021 05:16:58 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38262 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237820AbhKHKPD (ORCPT ); Mon, 8 Nov 2021 05:15:03 -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 882681EC04F9; Mon, 8 Nov 2021 11:12:18 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366338; 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=pC+lbIlcGv1j3XkDfTSs0sRGhsbjTty6nFQwrtKjf0s=; b=Z9gIVV1V5rkYabJG5os2pf2e3fqyNnmC8KQbPSgnSrNG03TKVFMiJQZbqs6mLQsMCwwtPv T2k/IrVub07C1zRLDSMF5PcVyP83dk29HeYQcgvUDHSTpT5WVdohPsz7lQiFRuOjq7cN+y su2vysrZbwd/yJvnCwHzEAgs6lfkKZ0= From: Borislav Petkov To: LKML Cc: linux-pm@vger.kernel.org Subject: [PATCH v0 13/42] power: reset: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:28 +0100 Message-Id: <20211108101157.15189-14-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-pm@vger.kernel.org --- drivers/power/reset/ltc2952-poweroff.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/power/reset/ltc2952-poweroff.c b/drivers/power/reset/ltc2952-poweroff.c index fbb344353fe4..6ca251e4b1be 100644 --- a/drivers/power/reset/ltc2952-poweroff.c +++ b/drivers/power/reset/ltc2952-poweroff.c @@ -279,8 +279,10 @@ static int ltc2952_poweroff_probe(struct platform_device *pdev) pm_power_off = ltc2952_poweroff_kill; data->panic_notifier.notifier_call = ltc2952_poweroff_notify_panic; - atomic_notifier_chain_register(&panic_notifier_list, - &data->panic_notifier); + + if (atomic_notifier_chain_register(&panic_notifier_list, &data->panic_notifier)) + pr_warn("LTC2952 panic notifier already registered\n"); + dev_info(&pdev->dev, "probe successful\n"); return 0; -- 2.29.2