block: fix SG_IO to return a proper error value