Step 1: Figure out whether your driver is returning a physical or logical
address for the CMA, and which of the two /dev/mem requires.
Step 2: Take a look at the address returned and make sure it at least
looks valid (is someplace the E820 map says is RAM, isn't a PCI BAR or
something like that, etc etc)
Those are the two biggest sources of error I can think of...