I would rewrite above as
void __iomem *ret;
ret = ioremap_np(offset, size);
if (ret)
return ret;
return ioremap(offset, size);
Looks like it might be one of those rare occasions where the GCC ternary if
extension thingy comes in handy:
return ioremap_np(offset, size) ?: ioremap(offset, size);
Acked-by: Will Deacon <will@xxxxxxxxxx>