Thank you, but I'm not so sure...
The Ubports version is changed compared to standard version... Particularly when it come to this function's return value... So I'm hoping the ubports change is what I need.
So I'm now trying to compile ubports version of mir... And the try it (but it's a lot to compile and there are include files missing)... So it takes a while....
So I try that first, before venturing into the kernel.