[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211108101157.15189-10-bp@alien8.de>
Date: Mon, 8 Nov 2021 11:11:24 +0100
From: Borislav Petkov <bp@...en8.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: linux-iio@...r.kernel.org
Subject: [PATCH v0 09/42] iio: proximity: cros_ec: Check notifier registration return value
From: Borislav Petkov <bp@...e.de>
Avoid homegrown notifier registration checks.
No functional changes.
Signed-off-by: Borislav Petkov <bp@...e.de>
Cc: linux-iio@...r.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
Powered by blists - more mailing lists