kernel-device: assert 'vendor' and 'product' in get_device_ids()
These two parameters must always be given.
This commit is contained in:
@@ -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);
|
||||||
|
Reference in New Issue
Block a user