Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The return value of of_ioremap on failure should be -ENODEV and not -1. Found using Coccinelle. A simplified version of the semantic patch used is: // @@ expression *e; @@ e = of_ioremap(…); if (e == NULL) { … return – -1 + -ENODEV ; } // The single call …