General changes from the obattler_202406 branch
Co-Authored-By: Miran Grča <oubattler@gmail.com>
This commit is contained in:
@@ -158,6 +158,13 @@ device_add_common(const device_t *dev, void *p, void *params, int inst)
|
||||
void *priv = NULL;
|
||||
int16_t c;
|
||||
|
||||
/*
|
||||
IMPORTANT: This is needed to gracefully handle machine
|
||||
device addition if the relevant device is NULL.
|
||||
*/
|
||||
if (dev == NULL)
|
||||
return NULL;
|
||||
|
||||
if (!device_available(dev)) {
|
||||
wchar_t temp[512] = { 0 };
|
||||
swprintf(temp, sizeof_w(temp),
|
||||
|
||||
Reference in New Issue
Block a user