staging: r8188eu: convert rtw_p2p_enable to correct error code semantics
Convert the rtw_p2p_enable function to use correct error code semantics rather than _SUCCESS/_FAIL, and also make sure we allow these to be passed through properly in the one caller where we actually check the code, rtw_wext_p2p_enable. This change moves these functions to a clearer 'return 0;' style at the end of the function, and in the case of errors now returns ret instead of jumping to the end of the function, so that these can still be passed through but without using a goto to jump to a single return statement at the end which is less clear. This change moves the driver slowly closer to using standard error code semantics everywhere. 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/20220802234408.930-1-phil@philpotter.co.ukSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
Please register or sign in to comment