packet: fix error handling
[powerpc.git] / drivers / block / pktcdvd.c
index a4fb703..f1b9dd7 100644 (file)
@@ -777,7 +777,8 @@ static int pkt_generic_packet(struct pktcdvd_device *pd, struct packet_command *
                rq->cmd_flags |= REQ_QUIET;
 
        blk_execute_rq(rq->q, pd->bdev->bd_disk, rq, 0);
-       ret = rq->errors;
+       if (rq->errors)
+               ret = -EIO;
 out:
        blk_put_request(rq);
        return ret;