summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/idr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/idr.c b/lib/idr.c
index 36ff732fd2a..e79e051bddc 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -814,10 +814,10 @@ void *idr_replace(struct idr *idp, void *ptr, int id)
p = idp->top;
if (!p)
- return ERR_PTR(-EINVAL);
+ return ERR_PTR(-ENOENT);
if (id > idr_max(p->layer + 1))
- return ERR_PTR(-EINVAL);
+ return ERR_PTR(-ENOENT);
n = p->layer * IDR_BITS;
while ((n > 0) && p) {