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:
parent
d3c4e100ed
commit
aad59c6dee
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue