- improve error checking

svn path=/trunk/; revision=25295
This commit is contained in:
Johannes Anderwald 2007-01-04 16:22:06 +00:00
parent 6e368b2fff
commit 15c3d63c0f

View file

@ -68,9 +68,15 @@ static NTSTATUS InitDevice(
DPRINT("Creating DOS link\n");
/* Create the dos device link */
IoCreateSymbolicLink(&SymlinkName,
s = IoCreateSymbolicLink(&SymlinkName,
&DeviceName);
if (!NT_SUCCESS(s))
{
IoDeleteDevice(DeviceObject);
return s;
}
DPRINT("Initializing device\n");
// DPRINT("Allocating memory for parameters structure\n");
@ -126,6 +132,7 @@ static NTSTATUS InitDevice(
// Set state indication somehow
// Failure - what error code do we give?!
// return STATUS_????
IoDeleteDevice(DeviceObject);
return STATUS_UNSUCCESSFUL;
}