handle rv from do_piuio_read appropriately

Watch, I'll enter the same calculations using what we like to call "the
right way."  Also, remember to unlock things...