- error = rtnetlink_link_notifier_register(&netdev_linux_cache_notifier,
- netdev_linux_cache_cb, NULL);
- if (error) {
- return error;
+ assert(!netdev_linux_cache_notifier);
+
+ netdev_linux_cache_notifier =
+ rtnetlink_link_notifier_create(netdev_linux_cache_cb, NULL);
+
+ if (!netdev_linux_cache_notifier) {
+ return EINVAL;