From b82483c76ce70e88fb7914a44238d0348d9de1dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Poussineau?= Date: Wed, 6 Apr 2005 06:09:01 +0000 Subject: [PATCH] Verify that allocated resource list is not NULL in IRP_MN_START_DEVICE. svn path=/trunk/; revision=14524 --- reactos/drivers/dd/serial/pnp.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/reactos/drivers/dd/serial/pnp.c b/reactos/drivers/dd/serial/pnp.c index 256b337ef66..211f7ae4386 100644 --- a/reactos/drivers/dd/serial/pnp.c +++ b/reactos/drivers/dd/serial/pnp.c @@ -320,7 +320,17 @@ SerialPnp( Status = STATUS_SUCCESS; break; } - /* FIXME: second HACK: verify that we don't have resource conflict, + /* FIXME: second HACK: verify that we have some allocated resources. + * It seems not to be always the case on some hardware + */ + if (Stack->Parameters.StartDevice.AllocatedResources == NULL) + { + DPRINT1("Serial: no allocated resources. Can't start COM%lu\n", + ((PSERIAL_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->ComPort); + Status = STATUS_INSUFFICIENT_RESOURCES; + break; + } + /* FIXME: third HACK: verify that we don't have resource conflict, * because PnP manager doesn't do it automatically */ Status = IoReportResourceForDetection(