Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6246697pxb; Mon, 8 Nov 2021 05:39:46 -0800 (PST) X-Google-Smtp-Source: ABdhPJxN5jfi/KQsUFtUpGXLzMhIxmMlt5XTB4860FRXAKFEus3RNyjxoM86kBbMg8VGGkRnv7Yy X-Received: by 2002:a05:6602:2c43:: with SMTP id x3mr13625296iov.145.1636378785896; Mon, 08 Nov 2021 05:39:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636378785; cv=none; d=google.com; s=arc-20160816; b=WPzeMzgCt4g38rpmnAvNnYPKv6dBOX6P6bHsSlN/vpDXOVwQLyN84yV7WnX5jm90N3 W+vWpk0/+wi76D53gGcXf4W+OYVv1zbQhJZ+Q7I8hYjXtaTL+WxZ7RQYVuzlC0C6OU5f S/czcVpD2gNiwDdO1vEEPQir3p3GhwzpnAVX8C16ABcse6FvFFsfIbMlXSo8dmnBEXFa EcJ1XCC/NCMYuGbwql2E+Yp1vNeuoiy+SR97wEW6n5hkPypS2uPAugB+m+XlbZTmo0B/ 2PLkySliRt1bIB/UxwkxhMpL4ChA3BJlufzE6t30mdS3unD1cEF1h3h9a5XDrx7iv9Z5 Umtw== 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=5VjFGofRpfW/M3GJSnJSs8mCf9EpIZn8Ox7wnRL5gBs=; b=cbL4cqF29Q1AsoITfD4z5yKouom7gnPtTpL13CEJf5LF8OOuROo6hJlVCaiEK7nX9k d3C+uxmjni7eApVdtdyndJJSF71DfPugqKh2AaBIbdI/OsKSRVsQhI2C1C3STKhe3g8V zuZrA025gZtSpd+97Gg9CuhovCH9ZMWpbm9QeuHNHahbHRVNHWODltQTX0pJjQGCWdFn 3UMz8pvBaS8HwO/i0gp/RguexaC78E9eU+U2f1uKLKRHKl0YSKO0gEedZvR7u4Bbo7sl Rhz9dRxnseCzLe6Vc/Q79V/AULAUhgotwAywt5aW7KpQcd/y/pND8jqNJYoRpviDafdD AGqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=FdHeGQk9; 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 a9si24602976ilv.17.2021.11.08.05.39.26; Mon, 08 Nov 2021 05:39:45 -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=FdHeGQk9; 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 S238667AbhKHKPq (ORCPT + 99 others); Mon, 8 Nov 2021 05:15:46 -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 S237761AbhKHKPA (ORCPT ); Mon, 8 Nov 2021 05:15:00 -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 5951B1EC04EE; Mon, 8 Nov 2021 11:12:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366335; 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=5VjFGofRpfW/M3GJSnJSs8mCf9EpIZn8Ox7wnRL5gBs=; b=FdHeGQk9yAoS+fFUllEcBXQ5Tz4h9+saH7MAvBFyDjO0UA+pxqVSKyWKIVxOyu9TQpl9S8 sQxKQ3ngxNIcRHJeFuxeUn0G+qI0O1Ko4KIF63vG4XPeHkTQ0ZdAYFFlEbLxxkD5M3Q370 ETTEpRFK8AgwwDA2xUjxOSBbgWxC83g= From: Borislav Petkov To: LKML Cc: linux-iio@vger.kernel.org Subject: [PATCH v0 09/42] iio: proximity: cros_ec: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:24 +0100 Message-Id: <20211108101157.15189-10-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-iio@vger.kernel.org --- drivers/iio/proximity/cros_ec_mkbp_proximity.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/proximity/cros_ec_mkbp_proximity.c b/drivers/iio/proximity/cros_ec_mkbp_proximity.c index 8213b0081713..e9536de8dd8a 100644 --- a/drivers/iio/proximity/cros_ec_mkbp_proximity.c +++ b/drivers/iio/proximity/cros_ec_mkbp_proximity.c @@ -234,7 +234,8 @@ static int cros_ec_mkbp_proximity_probe(struct platform_device *pdev) return ret; data->notifier.notifier_call = cros_ec_mkbp_proximity_notify; - blocking_notifier_chain_register(&ec->event_notifier, &data->notifier); + if (blocking_notifier_chain_register(&ec->event_notifier, &data->notifier)) + pr_warn("cros-ec proximity notifier already registered\n"); return 0; } -- 2.29.2