From patchwork Wed Dec 5 15:25:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [BUGFIX] rtc: eliminate extra call of ida_simple_remove() X-Patchwork-Submitter: =?utf-8?q?Lothar_Wa=C3=9Fmann?= X-Patchwork-Id: 203890 Message-Id: <1354721131-31177-1-git-send-email-LW@KARO-electronics.de> To: Alessandro Zummo Cc: rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org, =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= Date: Wed, 5 Dec 2012 16:25:31 +0100 From: =?UTF-8?q?Lothar=20Wa=C3=9Fmann?= List-Id: Unbinding an RTC chip driver from its device leads to the error message: |ida_remove called for id=0 which is not allocated. This is caused by a redundant call to ida_simple_remove() in rtc_device_unregister(). Eliminate the call in rtc_device_unregister() and only call the function in rtc_device_release(). Signed-off-by: Lothar Waßmann Signed-off-by: Alexander Holler --- drivers/rtc/class.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index f8a0aab..5143629 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -244,7 +244,6 @@ void rtc_device_unregister(struct rtc_device *rtc) rtc_proc_del_device(rtc); device_unregister(&rtc->dev); rtc->ops = NULL; - ida_simple_remove(&rtc_ida, rtc->id); mutex_unlock(&rtc->ops_lock); put_device(&rtc->dev); }