From 105dd04ee515a57930aa312d22fa6733e1d745ba Mon Sep 17 00:00:00 2001 From: Kian Karas Date: Sat, 2 Nov 2024 17:36:08 +0100 Subject: [PATCH] net/netlink: fix netlink poll return value on success Make sure the return value is zero on success - as described in the documentation of the function. It doesn't look like the "error" affected any code. --- net/netlink/netlink_notifier.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netlink/netlink_notifier.c b/net/netlink/netlink_notifier.c index d8a0fc884e..8bb144ec60 100644 --- a/net/netlink/netlink_notifier.c +++ b/net/netlink/netlink_notifier.c @@ -80,7 +80,7 @@ int netlink_notifier_setup(worker_t worker, FAR struct netlink_conn_s *conn, info.worker = worker; conn->key = work_notifier_setup(&info); - return conn->key; + return conn->key < 0 ? conn->key : 0; } /****************************************************************************