Skip to content

Commit

Permalink
wutdevoptab: Return FS_ERROR_MAX_CLIENTS if FSAAddClient fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Maschell committed Apr 8, 2023
1 parent 4816a37 commit d73dc40
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libraries/wutdevoptab/devoptab_fsa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ static devoptab_t
__wut_fsa_device_t __wut_fsa_device_data = {};

FSError __init_wut_devoptab() {
FSError rc = FS_ERROR_OK;
FSError rc;

if (__wut_fsa_device_data.setup) {
return rc;
return FS_ERROR_OK;
}

__wut_fsa_device_data = {};
Expand All @@ -57,7 +57,7 @@ FSError __init_wut_devoptab() {
__wut_fsa_device_data.clientHandle = FSAAddClient(nullptr);
if (__wut_fsa_device_data.clientHandle == 0) {
WUT_DEBUG_REPORT("FSAAddClient() failed");
return rc;
return FS_ERROR_MAX_CLIENTS;
}

int dev = AddDevice(&__wut_fsa_device_data.device);
Expand Down Expand Up @@ -97,7 +97,7 @@ FSError __init_wut_devoptab() {
return FS_ERROR_MAX_CLIENTS;
}

return rc;
return FS_ERROR_OK;
}

FSError
Expand Down

0 comments on commit d73dc40

Please sign in to comment.