kernel-device: assert 'vendor' and 'product' in get_device_ids()

These two parameters must always be given.
This commit is contained in:
Aleksander Morgado
2017-08-15 18:18:43 +02:00
parent 7e22696b34
commit eb64d39e52

View File

@@ -57,6 +57,8 @@ get_device_ids (GUdevDevice *device,
gboolean success = FALSE; gboolean success = FALSE;
char *pci_vid = NULL, *pci_pid = NULL; char *pci_vid = NULL, *pci_pid = NULL;
g_assert (vendor != NULL && product != NULL);
parent = g_udev_device_get_parent (device); parent = g_udev_device_get_parent (device);
if (parent) { if (parent) {
parent_subsys = g_udev_device_get_subsystem (parent); parent_subsys = g_udev_device_get_subsystem (parent);