mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-26 07:17:23 +00:00
[common] ivshmem: check for failure to find a device
This commit is contained in:
parent
11800029f0
commit
905c1d7f58
@ -132,6 +132,13 @@ bool ivshmemInit(struct IVSHMEM * dev)
|
|||||||
i == shmDevice ? '*' : ' ', bus, addr >> 16, addr & 0xFFFF);
|
i == shmDevice ? '*' : ' ', bus, addr >> 16, addr & 0xFFFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!device)
|
||||||
|
{
|
||||||
|
vector_destroy(&devices);
|
||||||
|
DEBUG_ERROR("Unable to find a IVSHMEM device");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
device = vector_ptrTo(&devices, shmDevice);
|
device = vector_ptrTo(&devices, shmDevice);
|
||||||
memcpy(&devInfoData, &device->devInfoData, sizeof(SP_DEVINFO_DATA));
|
memcpy(&devInfoData, &device->devInfoData, sizeof(SP_DEVINFO_DATA));
|
||||||
vector_destroy(&devices);
|
vector_destroy(&devices);
|
||||||
|
Loading…
Reference in New Issue
Block a user