Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp6337301pxb; Mon, 8 Nov 2021 07:03:04 -0800 (PST) X-Google-Smtp-Source: ABdhPJxmk4muW4/Jhi0TpMwT2B+Ofkuy08SXySnTZGbshlth9D0FHIHkRTOUyqnadQ+8zuasfQOm X-Received: by 2002:a05:6638:1348:: with SMTP id u8mr154327jad.95.1636383784385; Mon, 08 Nov 2021 07:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636383784; cv=none; d=google.com; s=arc-20160816; b=ril2GMIvQ0NA8cLDZgZeqE0bZkxS+JAlB5pt5qeN4E0r0LnNNT4TpjlT/sDXs5YF1b 1uI1VQLZXro2Mn4P/MO8YsBL2GLYRK7kLJrhw2MUaFKl3ERuia24dZSkf/v7aQ8A5peh jg6yljHJfk7fFGd8qiHkDuHUzvGnxySCXDO/tgyiGqjOYFsvv9OTD7fuH4MsKsKLq9EO os0rL9BUPNGJ5PVudrDnTUt7Qu+o2UaF9x1i2TA0X69qWaZwiyfWfaS3A428jGlMjzRx XNvDudFYTXRvYEbi3ZWsXlQpEirSKBMbWw8NiP+o6y3GOWJd1+B6cSGuXVR72KM5By9k o5Kg== 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=ep7j9G42891L05tSsxLfVmYsv/PsX1G5hep8Uts9rKg=; b=P74D1kdfQf2PhmjdPxiNiT/Xq9Ng7ajneLFsAxtbQW6sEM3EuQSWpJT5S7yr45xgXh yWE5gbp4bLkpEbEBDlS1mPk81FgdKUGba1XW5C/bIbPEELizV7gWv5+Gtj048kmFDUFL H9MDa3/uGBSePYNfmCsL2ynHoimmBlWJ9Qdsaf29ikR8QexNtqtGfepxPBbgwt8xX0tJ /OCr9gD9+cmHCANlrJmxP461dIWwWefyEd7h4YA46h6eBj1K9oRczAB7NGkdA+TcY1z0 BngY+wMFMTkvmKB5L1cpZIhATr1Cmrc79+F4vSHqT1iE7mEu3Jj6dDBLvEHZrMNCudgI Dm3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=UKC4fpx8; 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 r6si37080753ill.97.2021.11.08.07.02.48; Mon, 08 Nov 2021 07:03:04 -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=UKC4fpx8; 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 S237768AbhKHKQv (ORCPT + 99 others); Mon, 8 Nov 2021 05:16:51 -0500 Received: from mail.skyhub.de ([5.9.137.197]:38212 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237796AbhKHKPC (ORCPT ); Mon, 8 Nov 2021 05:15:02 -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 BBC4E1EC04DF; Mon, 8 Nov 2021 11:12:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1636366337; 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=ep7j9G42891L05tSsxLfVmYsv/PsX1G5hep8Uts9rKg=; b=UKC4fpx8lgFJ+d817FD2SefJHa5FpEyJJINldotdQ3J8/DARkWx6+2tSVfDBt9/vMCPdgk d0/bOdrlhmQVLLslQ1PHOLlAdmEnk8KPxvKbLDbzyCXkXm3tVe+w8FxX7/Td7u2JtPBhM6 OUvsLZZwU2kqY+sl4Elxc1X3iI1slcs= From: Borislav Petkov To: LKML Cc: Ayush Sawal , Vinay Kumar Yadav , Rohit Maheshwari Subject: [PATCH v0 12/42] ethernet: chelsio: Check notifier registration return value Date: Mon, 8 Nov 2021 11:11:27 +0100 Message-Id: <20211108101157.15189-13-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: Ayush Sawal Cc: Vinay Kumar Yadav Cc: Rohit Maheshwari --- .../net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c index 9098b3eed4da..43ee3fb6bc67 100644 --- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c +++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_main.c @@ -39,7 +39,10 @@ static uint send_page_order = (14 - PAGE_SHIFT < 0) ? 0 : 14 - PAGE_SHIFT; static void register_listen_notifier(struct notifier_block *nb) { mutex_lock(¬ify_mutex); - raw_notifier_chain_register(&listen_notify_list, nb); + + if (raw_notifier_chain_register(&listen_notify_list, nb)) + pr_warn("chtls listen notifier already registered\n"); + mutex_unlock(¬ify_mutex); } -- 2.29.2