[PATCH 3/3] reg: Prevent buffer over-read when querying REG_NONE values with no data