Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6344210pxb; Mon, 8 Nov 2021 07:08:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxC6Z1FU5SNWRvH5MbX4O0ArqvrmHjvYP0SOoTVlXfSXqDozWyFnkGFaaYryujO+rT0WCJL X-Received: by 2002:a17:907:d90:: with SMTP id go16mr578248ejc.137.1636384123764; Mon, 08 Nov 2021 07:08:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636384123; cv=none; d=google.com; s=arc-20160816; b=dFtnQTSa+laqjcpf6H3v4uv9Nn6SDLVPS+bxQPEV34uPdQqj1ClOrDDjYJRZNMp/Nk g04BAPBIphhRUWwqPQ0MsOJzSiRscuiAIZvrqUtHVrA99Kyb2zpy1w0oU5rJHVlPMoxY vaVYtzr7zNHSv/vQZDx6zzJrPBUcL7o24zz0riCH9Z/TPEQnsZQUX8+6J/Ln3ZvjFKET 4sNw485Vi3dWiD26stAK6LoZeTYlIRHV778eHmyZdp+aC1TQQf/+rJ7HQgs3VREPkK8b QbR5Aimo9pYwUC0u9uIScl4FPnu/tFTieBzvTKM4CXV9T55j/ulNXCoilpBagZqLUV+0 hoKA== 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=nRs8Hwu0oLLsUo7HT1qzBFdIIrVvFV70O+h27c4scJI=; b=hQG7Ig+LQpJamsRMuwXA+FuvZ8OzjNWXi2VhjKhKIm0K2zItL95uE3TUdwsEoMoh8U dUewZoJUfqwqcZmQOM+CPVqDTaotlqC/xCzCksES7jWyS+vscrcWXNvJKhfpubhWmwDG huTTcW93sLE6dtyEmR8p1hjOlkW6FrKodpUaMBpLjf8Ijx6jhY2iXkFok1BhJGkoI9hf Rl/LgpB1ZPJB8Fo99v+KlswBxI2qU/vMNEvdhMmufikjoq1JzPrgzTp4GzkxwSqG5E8h qCRCRtvrjD8lVq3hFrjmJYncT7uEwj8oh8TKVehT721VZSLAeVTioLbRbj7CFoJcymRa DVwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=k0XF0Y4n; 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 j2si2258387edv.164.2021.11.08.07.08.17; Mon, 08 Nov 2021 07:08: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=k0XF0Y4n; 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 S237901AbhKHKRY (ORCPT + 99 others); Mon, 8 Nov 2021 05:17:24 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38394 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238570AbhKHKPM (ORCPT ); Mon, 8 Nov 2021 05:15:12 -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 100541EC0501; Mon, 8 Nov 2021 11:12:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366347; 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=nRs8Hwu0oLLsUo7HT1qzBFdIIrVvFV70O+h27c4scJI=; b=k0XF0Y4nVjzUo+96uDWhyD+qexJi5lhwEKmlAtzm0xq5K2QA/s1v8CS0X3OQxJhFPpkyFI sKueirlziAwcAeXkBh60Cl1U+AdW7woPc51BvNYDLSzUecr1BzLDOmH6SyYdt9PBSnW0vD fsKgB9zAWNVyDubPQDLYS6w+i8HC2gw= From: Borislav Petkov To: LKML Cc: linux-staging@lists.linux.dev Subject: [PATCH v0 24/42] staging: olpc_dcon: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:39 +0100 Message-Id: <20211108101157.15189-25-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-staging@lists.linux.dev --- drivers/staging/olpc_dcon/olpc_dcon.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/olpc_dcon/olpc_dcon.c b/drivers/staging/olpc_dcon/olpc_dcon.c index 7284cb4ac395..f5204a88bb35 100644 --- a/drivers/staging/olpc_dcon/olpc_dcon.c +++ b/drivers/staging/olpc_dcon/olpc_dcon.c @@ -653,7 +653,9 @@ static int dcon_probe(struct i2c_client *client, const struct i2c_device_id *id) } register_reboot_notifier(&dcon->reboot_nb); - atomic_notifier_chain_register(&panic_notifier_list, &dcon_panic_nb); + + if (atomic_notifier_chain_register(&panic_notifier_list, &dcon_panic_nb)) + pr_warn("Panic notifier already registered\n"); return 0; -- 2.29.2