From 45a0b23e06c15093835f9ef474b08159209ef1b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B8ren=20Schmidt?= Date: Mon, 12 Jan 2004 09:33:10 +0000 Subject: Always return ENOMEM if ata_request_alloc fails so GEOM can dtrt. --- sys/dev/ata/atapi-cd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/dev/ata/atapi-cd.c') 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, -- cgit v1.2.3