mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
- improve error checking
svn path=/trunk/; revision=25295
This commit is contained in:
parent
6e368b2fff
commit
15c3d63c0f
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue