mesa: fix error handling for glMapBufferRange