summaryrefslogtreecommitdiff
path: root/lib/logic_pio.c
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2021-05-04 21:46:00 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2021-05-04 21:46:00 +0300
commitd0034a7a4ac7fae708146ac0059b9c47a1543f0d (patch)
treeac3ac88066f0f80632aa754e3ae008994f2426a2 /lib/logic_pio.c
parent56cfe6f820a6315291eb5a1b82bb49633b993d3b (diff)
parentd12b64b9764ea17554fb230784ebf91287ed807e (diff)
downloadlinux-d0034a7a4ac7fae708146ac0059b9c47a1543f0d.tar.xz
Merge branch 'next' into for-linus
Prepare input updates for 5.13 merge window.
Diffstat (limited to 'lib/logic_pio.c')
-rw-r--r--lib/logic_pio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/logic_pio.c b/lib/logic_pio.c
index f32fe481b492..07b4b9a1f54b 100644
--- a/lib/logic_pio.c
+++ b/lib/logic_pio.c
@@ -28,6 +28,8 @@ static DEFINE_MUTEX(io_range_mutex);
* @new_range: pointer to the IO range to be registered.
*
* Returns 0 on success, the error code in case of failure.
+ * If the range already exists, -EEXIST will be returned, which should be
+ * considered a success.
*
* Register a new IO range node in the IO range list.
*/
@@ -51,6 +53,7 @@ int logic_pio_register_range(struct logic_pio_hwaddr *new_range)
list_for_each_entry(range, &io_range_list, list) {
if (range->fwnode == new_range->fwnode) {
/* range already there */
+ ret = -EEXIST;
goto end_register;
}
if (range->flags == LOGIC_PIO_CPU_MMIO &&