projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kfence: add test suite
[linux-2.6-microblaze.git]
/
lib
/
logic_pio.c
diff --git
a/lib/logic_pio.c
b/lib/logic_pio.c
index
f32fe48
..
07b4b9a
100644
(file)
--- 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.
* @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.
*/
*
* 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 */
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 &&
goto end_register;
}
if (range->flags == LOGIC_PIO_CPU_MMIO &&