Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6ac12dfe authored by Sonny Rao's avatar Sonny Rao Committed by Linus Torvalds
Browse files

[PATCH] rtc: fix idr locking



We need to serialize access to the global rtc_idr even in this error path.

Signed-off-by: default avatarSonny Rao <sonny@burdell.org>
Acked-by: default avatarAlessandro Zummo <a.zummo@towertech.it>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b65b5b59
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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",