diff options
author | Søren Schmidt <sos@FreeBSD.org> | 2004-01-12 09:33:10 +0000 |
---|---|---|
committer | Søren Schmidt <sos@FreeBSD.org> | 2004-01-12 09:33:10 +0000 |
commit | 45a0b23e06c15093835f9ef474b08159209ef1b5 (patch) | |
tree | 225304cc5939c48119f41266b873051fb75634dd /sys/dev/ata/atapi-cd.c | |
parent | ab0a016c08211485e2949df271a675261899a86b (diff) |
Always return ENOMEM if ata_request_alloc fails so GEOM can dtrt.
Notes
Notes:
svn path=/head/; revision=124419
Diffstat (limited to 'sys/dev/ata/atapi-cd.c')
-rw-r--r-- | sys/dev/ata/atapi-cd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/ata/atapi-cd.c b/sys/dev/ata/atapi-cd.c index 6cdbaea8d8e6..5d897f9d6954 100644 --- a/sys/dev/ata/atapi-cd.c +++ b/sys/dev/ata/atapi-cd.c @@ -1139,7 +1139,7 @@ acd_start(struct ata_device *atadev) ccb[8] = count; if (!(request = ata_alloc_request())) { - g_io_deliver(bp, EIO); + g_io_deliver(bp, ENOMEM); return; } request->device = atadev; @@ -1335,9 +1335,9 @@ acd_select_slot(struct acd_softc *cdp) cdp->changer_info->current_slot, 0, 0, 0, 0, 0, 0, 0 }; /* unload the current media from player */ - if (!(request = ata_alloc_request())) { + if (!(request = ata_alloc_request())) return; - } + request->device = cdp->device; request->driver = cdp; bcopy(ccb, request->u.atapi.ccb, |