Clean-ups in device.c/h and the _params() device add functions now work exactly as originally planned.

This commit is contained in:
OBattler
2024-05-25 02:00:19 +02:00
parent beddf47de8
commit a614e935fb
5 changed files with 63 additions and 111 deletions

View File

@@ -1613,8 +1613,8 @@ nic_init(const device_t *info)
params.default_content = (uint16_t *) s->eeprom_data;
params.filename = filename;
snprintf(filename, sizeof(filename), "nmc93cxx_eeprom_%s_%d.nvr", info->internal_name, device_get_instance());
s->eeprom = device_add_parameters(&nmc93cxx_device, &params);
if (!s->eeprom) {
s->eeprom = device_add_params(&nmc93cxx_device, &params);
if (s->eeprom == NULL) {
free(s);
return NULL;
}