Commit 2b5002e
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>1 parent 4709238 commit 2b5002e
3 files changed
Lines changed: 15 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | | - | |
| 1891 | + | |
1892 | 1892 | | |
1893 | 1893 | | |
1894 | 1894 | | |
| |||
1902 | 1902 | | |
1903 | 1903 | | |
1904 | 1904 | | |
1905 | | - | |
| 1905 | + | |
1906 | 1906 | | |
1907 | 1907 | | |
1908 | 1908 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
381 | 381 | | |
382 | 382 | | |
383 | 383 | | |
384 | | - | |
| 384 | + | |
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
389 | 389 | | |
390 | 390 | | |
391 | | - | |
| 391 | + | |
392 | 392 | | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
396 | | - | |
| 396 | + | |
397 | 397 | | |
398 | 398 | | |
399 | 399 | | |
400 | 400 | | |
401 | | - | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
439 | 439 | | |
440 | 440 | | |
441 | 441 | | |
442 | | - | |
| 442 | + | |
443 | 443 | | |
444 | 444 | | |
445 | 445 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
| 690 | + | |
| 691 | + | |
694 | 692 | | |
695 | | - | |
696 | 693 | | |
697 | 694 | | |
698 | 695 | | |
| |||
931 | 928 | | |
932 | 929 | | |
933 | 930 | | |
934 | | - | |
935 | | - | |
936 | | - | |
937 | | - | |
| 931 | + | |
| 932 | + | |
938 | 933 | | |
939 | | - | |
940 | 934 | | |
941 | 935 | | |
942 | 936 | | |
| |||
1049 | 1043 | | |
1050 | 1044 | | |
1051 | 1045 | | |
1052 | | - | |
1053 | | - | |
| 1046 | + | |
| 1047 | + | |
1054 | 1048 | | |
1055 | | - | |
1056 | 1049 | | |
1057 | 1050 | | |
1058 | 1051 | | |
| |||
1252 | 1245 | | |
1253 | 1246 | | |
1254 | 1247 | | |
1255 | | - | |
1256 | | - | |
| 1248 | + | |
| 1249 | + | |
1257 | 1250 | | |
1258 | | - | |
1259 | 1251 | | |
1260 | 1252 | | |
1261 | 1253 | | |
| |||
0 commit comments