if (!(write_resp = device_write_1(&write_parms, vxi->client))
|| write_resp->error) {
sr_err("Device write failed for %s with error %d",
- vxi->address, write_resp->error);
+ vxi->address, write_resp ? write_resp->error : 0);
return SR_ERR;
}
if (!(read_resp = device_read_1(&read_parms, vxi->client))
|| read_resp->error) {
sr_err("Device read failed for %s with error %d",
- vxi->address, read_resp->error);
+ vxi->address, read_resp ? read_resp->error : 0);
return SR_ERR;
}