From: Eric Biggers Date: Tue, 3 Oct 2017 23:16:13 +0000 (-0700) Subject: lib/idr.c: fix comment for idr_replace() X-Git-Tag: MMI-PSA29.97-13-9~4594^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a70e43a59de9316e6fbad3b65557d0a24c099aca;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git lib/idr.c: fix comment for idr_replace() idr_replace() returns the old value on success, not 0. Link: http://lkml.kernel.org/r/20170918162642.37511-1-ebiggers3@gmail.com Signed-off-by: Eric Biggers Cc: Matthew Wilcox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/lib/idr.c b/lib/idr.c index f9adf4805fd7..edd9b2be1651 100644 --- a/lib/idr.c +++ b/lib/idr.c @@ -146,8 +146,8 @@ EXPORT_SYMBOL(idr_get_next_ext); * idr_alloc() and idr_remove() (as long as the ID being removed is not * the one being replaced!). * - * Returns: 0 on success. %-ENOENT indicates that @id was not found. - * %-EINVAL indicates that @id or @ptr were not valid. + * Returns: the old value on success. %-ENOENT indicates that @id was not + * found. %-EINVAL indicates that @id or @ptr were not valid. */ void *idr_replace(struct idr *idr, void *ptr, int id) {