diff options
author | Phillip Potter <phil@philpotter.co.uk> | 2022-07-25 23:07:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-07-27 08:45:32 +0200 |
commit | 2b5002e2cc1483b6333d31e21902b78a1997909e (patch) | |
tree | ce6a08152a314d315d610c36858acb9c59dba942 /drivers/platform/surface/aggregator/ssh_request_layer.c | |
parent | 47092381023050ab90c3f0603a587f798d37f194 (diff) |
staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics
Convert the rtw_pwr_wakeup function to use 0 on success and an appropriate
error code on error. For the first failure block where ips_leave is
invoked, use -ENOMEM as this is the main cause of failure here anyway.
For the second failure block, use -EBUSY, as it seems the most
appropriate.
Finally, within the functions rtw_wx_set_mode, rtw_wx_set_wap,
rtw_wx_set_scan and rtw_wx_set_essid, pass the error code on from
rtw_pwr_wakeup as appropriate now that it is converted.
This gets the driver closer to removal of the non-standard _SUCCESS and
_FAIL definitions, which are inverted compared to the standard in-kernel
error code mechanism.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20220725220745.12739-1-phil@philpotter.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/platform/surface/aggregator/ssh_request_layer.c')
0 files changed, 0 insertions, 0 deletions