Changeset 40be7eb in mainline
- Timestamp:
- 2024-12-30T23:07:56Z (5 months ago)
- Children:
- bc3d695
- Parents:
- 7d25273
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/device/src/hr.c
r7d25273 r40be7eb 47 47 { 48 48 errno_t rc; 49 50 hr_t *hr = calloc(1, sizeof(hr_t)); 49 hr_t *hr = NULL; 50 51 if (rhr == NULL) 52 return EINVAL; 53 54 hr = calloc(1, sizeof(hr_t)); 51 55 if (hr == NULL) { 52 56 rc = ENOMEM; … … 57 61 58 62 rc = loc_service_get_id(SERVICE_NAME_HR, &hr_svcid, 0); 59 if (rc != EOK) { 60 rc = EIO; 61 goto error; 62 } 63 if (rc != EOK) 64 goto error; 63 65 64 66 hr->sess = loc_service_connect(hr_svcid, INTERFACE_HR, 0); … … 73 75 if (hr != NULL) 74 76 free(hr); 75 *rhr = NULL; 77 76 78 return rc; 77 79 }
Note:
See TracChangeset
for help on using the changeset viewer.