|
|
@ -426,11 +426,10 @@ static bool icarus_detect_one(const char *devpath) |
|
|
|
applog(LOG_INFO, "Found Icarus at %s, mark as %d", |
|
|
|
applog(LOG_INFO, "Found Icarus at %s, mark as %d", |
|
|
|
devpath, icarus->device_id); |
|
|
|
devpath, icarus->device_id); |
|
|
|
|
|
|
|
|
|
|
|
if (icarus_info[icarus->device_id] == NULL) { |
|
|
|
// Since we are adding a new device on the end it needs to always be allocated
|
|
|
|
icarus_info[icarus->device_id] = (struct ICARUS_INFO *)malloc(sizeof(struct ICARUS_INFO)); |
|
|
|
icarus_info[icarus->device_id] = (struct ICARUS_INFO *)malloc(sizeof(struct ICARUS_INFO)); |
|
|
|
if (unlikely(!(icarus_info[icarus->device_id]))) |
|
|
|
if (unlikely(!(icarus_info[icarus->device_id]))) |
|
|
|
quit(1, "Failed to malloc ICARUS_INFO"); |
|
|
|
quit(1, "Failed to malloc ICARUS_INFO"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
info = icarus_info[icarus->device_id]; |
|
|
|
info = icarus_info[icarus->device_id]; |
|
|
|
|
|
|
|
|
|
|
|