In the (corner) case that someone requests to install a shared edge IRQ while the related support is not enabled (!CONFIG_XENO_OPT_SHIRQ_EDGE), BUT the opposite type (CONFIG_XENO_OPT_SHIRQ_LEVEL), Xenomai so far incorrectly installs the level-type handler. For the other way around, the non-shared dispatch handler is installed, which is also not correct. This patch fixes the issue by returning an error on registration, clearly indicating the system misconfiguration to the caller. Jan