diff options
Diffstat (limited to 'lib/idr.c')
-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 082778cf883e..f9adf4805fd7 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -151,7 +151,7 @@ EXPORT_SYMBOL(idr_get_next_ext); */ void *idr_replace(struct idr *idr, void *ptr, int id) { - if (WARN_ON_ONCE(id < 0)) + if (id < 0) return ERR_PTR(-EINVAL); return idr_replace_ext(idr, ptr, id); |