X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=lib%2Flogic_pio.c;h=07b4b9a1f54b6bf5ead2ee0fc2f4aa40c460ea2c;hb=6fbd6cf85a3be127454a1ad58525a3adcf8612ab;hp=f32fe481b4922bc1329b6e12e90ece534214d120;hpb=ce13266d97b198934e86166491bfa4938e96508f;p=linux-2.6-microblaze.git 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 &&