diff options
-rw-r--r-- | drivers/rtc/class.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index 5396bee..1cb61a7 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -94,7 +94,9 @@ exit_kfree: kfree(rtc); exit_idr: + mutex_lock(&idr_lock); idr_remove(&rtc_idr, id); + mutex_unlock(&idr_lock); exit: dev_err(dev, "rtc core: unable to register %s, err = %d\n", |