diff mbox series

[v2,07/10] plugin: Treat -ENOTSUP as -ENOSYS

Message ID 20230516205924.1040506-7-luiz.dentz@gmail.com
State Superseded
Headers show
Series [v2,01/10] profile: Add support for experimental flag | expand

Commit Message

Luiz Augusto von Dentz May 16, 2023, 8:59 p.m. UTC
From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If plugin .init returns -ENOTSUP treat it as the system doesn't
support the driver since that is the error returned by
btd_profile_register when experimental is disabled.
---
 src/plugin.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/plugin.c b/src/plugin.c
index dd7b406c857b..80990f8c3c7e 100644
--- a/src/plugin.c
+++ b/src/plugin.c
@@ -186,7 +186,7 @@  start:
 
 		err = plugin->desc->init();
 		if (err < 0) {
-			if (err == -ENOSYS)
+			if (err == -ENOSYS || err == -ENOTSUP)
 				warn("System does not support %s plugin",
 							plugin->desc->name);
 			else