]> git.karo-electronics.de Git - karo-tx-linux.git/commit
idr: fix idr_replace()'s returned error code
authorLai Jiangshan <laijs@cn.fujitsu.com>
Thu, 22 May 2014 00:44:08 +0000 (10:44 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 22 May 2014 00:44:08 +0000 (10:44 +1000)
commitd2bc568820c8937c7e3a3f817626cbc9baa6b9b8
tree57be282ac2c7d8c1b87fe0b1774a71cab3470194
parent0232296e18eef59b78964fe42da9742c33c8e866
idr: fix idr_replace()'s returned error code

When the smaller id is not found, idr_replace() returns -ENOENT.  But when
the id is bigger enough, idr_replace() returns -EINVAL, actually there is
no difference between these two kinds of ids.

These are all unallocated id, the return values of the idr_replace() for
these ids should be the same: -ENOENT.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/idr.c