summaryrefslogtreecommitdiffstats
path: root/lib/idr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--lib/idr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/idr.c b/lib/idr.c
index 6ff3b1c36..82c24a417 100644
--- a/lib/idr.c
+++ b/lib/idr.c
@@ -573,7 +573,9 @@ void ida_free(struct ida *ida, unsigned int id)
{
unsigned long flags;
- BUG_ON((int)id < 0);
+ if ((int)id < 0)
+ return;
+
xa_lock_irqsave(&ida->ida_rt, flags);
ida_remove(ida, id);
xa_unlock_irqrestore(&ida->ida_rt, flags);