mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xfree86: common: fix not-found check in xf86platformAddDevice()
Safer (and easier to understand) if we look at the result pointer instead of the counter for testing whether device wasn't found. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -685,7 +685,7 @@ xf86platformAddDevice(const char *driver_name, int index)
|
||||
}
|
||||
}
|
||||
|
||||
if (i == xf86NumDrivers) {
|
||||
if (!drvp) {
|
||||
ErrorF("can't find driver %s for hotplugged device\n", driver_name);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user