diff options
-rw-r--r-- | lib/idr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/idr.c b/lib/idr.c index b13682bb0a1c..20c2779e8d12 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -154,7 +154,7 @@ void *idr_replace(struct idr *idr, void *ptr, int id) void __rcu **slot = NULL; void *entry; - if (WARN_ON_ONCE(id < 0)) + if (id < 0) return ERR_PTR(-EINVAL); if (WARN_ON_ONCE(radix_tree_is_internal_node(ptr))) return ERR_PTR(-EINVAL); |