[ros-diffs] [hpoussin] 14524: Verify that allocated resource list is not NULL in IRP_MN_START_DEVICE.

hpoussin at svn.reactos.com hpoussin at svn.reactos.com
Wed Apr 6 08:09:06 CEST 2005


Verify that allocated resource list is not NULL in IRP_MN_START_DEVICE.
Modified: trunk/reactos/drivers/dd/serial/pnp.c
  _____  

Modified: trunk/reactos/drivers/dd/serial/pnp.c
--- trunk/reactos/drivers/dd/serial/pnp.c	2005-04-06 04:03:41 UTC
(rev 14523)
+++ trunk/reactos/drivers/dd/serial/pnp.c	2005-04-06 06:09:01 UTC
(rev 14524)
@@ -320,7 +320,17 @@

 				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(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.reactos.org/pipermail/ros-diffs/attachments/20050406/e78e9750/attachment.html


More information about the Ros-diffs mailing list