[PATCH v0 32/42] macintosh/adb: Check notifier registration return value

Borislav Petkov bp at alien8.de
Mon Nov 8 21:11:47 AEDT 2021


From: Borislav Petkov <bp at suse.de>

Avoid homegrown notifier registration checks.

No functional changes.

Reported-by: kernel test robot <lkp at intel.com>
Signed-off-by: Borislav Petkov <bp at suse.de>
Cc: linuxppc-dev at lists.ozlabs.org
---
 drivers/macintosh/adbhid.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/macintosh/adbhid.c b/drivers/macintosh/adbhid.c
index 994ba5cb3678..c8cbf8588186 100644
--- a/drivers/macintosh/adbhid.c
+++ b/drivers/macintosh/adbhid.c
@@ -1262,8 +1262,8 @@ static int __init adbhid_init(void)
 
 	adbhid_probe();
 
-	blocking_notifier_chain_register(&adb_client_list,
-			&adbhid_adb_notifier);
+	if (blocking_notifier_chain_register(&adb_client_list, &adbhid_adb_notifier))
+		pr_warn("ADB message notifier already registered\n");
 
 	return 0;
 }
-- 
2.29.2



More information about the Linuxppc-dev mailing list