Commit bd6781c
bnxt_en: Fix wrong return value check in bnxt_close_nic()
The wait_event_interruptible_timeout() function returns 0
if the timeout elapsed, -ERESTARTSYS if it was interrupted
by a signal, and the remaining jiffies otherwise if the
condition evaluated to true before the timeout elapsed.
Driver should have checked for zero return value instead of
a positive value.
MChan: Print a warning for -ERESTARTSYS. The close operation
will proceed anyway when wait_event_interruptible_timeout()
returns for any reason. Since we do the close no matter what,
we should not return this error code to the caller. Change
bnxt_close_nic() to a void function and remove all error
handling from some of the callers.
Fixes: c0c050c ("bnxt_en: New Broadcom ethernet driver.")
Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
Reviewed-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Link: https://lore.kernel.org/r/20231208001658.14230-4-michael.chan@broadcom.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent aded5d1 commit bd6781c
5 files changed
Lines changed: 16 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10732 | 10732 | | |
10733 | 10733 | | |
10734 | 10734 | | |
10735 | | - | |
| 10735 | + | |
10736 | 10736 | | |
10737 | | - | |
10738 | | - | |
10739 | 10737 | | |
10740 | 10738 | | |
10741 | 10739 | | |
| |||
10750 | 10748 | | |
10751 | 10749 | | |
10752 | 10750 | | |
| 10751 | + | |
| 10752 | + | |
10753 | 10753 | | |
10754 | 10754 | | |
10755 | 10755 | | |
10756 | | - | |
10757 | | - | |
| 10756 | + | |
| 10757 | + | |
| 10758 | + | |
| 10759 | + | |
10758 | 10760 | | |
10759 | 10761 | | |
10760 | 10762 | | |
10761 | | - | |
10762 | 10763 | | |
10763 | 10764 | | |
10764 | 10765 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2375 | 2375 | | |
2376 | 2376 | | |
2377 | 2377 | | |
2378 | | - | |
| 2378 | + | |
2379 | 2379 | | |
2380 | 2380 | | |
2381 | 2381 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | | - | |
| 452 | + | |
| 453 | + | |
461 | 454 | | |
462 | 455 | | |
463 | 456 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
| 168 | + | |
| 169 | + | |
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| |||
972 | 971 | | |
973 | 972 | | |
974 | 973 | | |
975 | | - | |
976 | | - | |
977 | | - | |
978 | | - | |
979 | | - | |
980 | | - | |
| 974 | + | |
981 | 975 | | |
982 | 976 | | |
983 | 977 | | |
| |||
4042 | 4036 | | |
4043 | 4037 | | |
4044 | 4038 | | |
4045 | | - | |
4046 | | - | |
4047 | | - | |
4048 | | - | |
4049 | | - | |
4050 | | - | |
| 4039 | + | |
4051 | 4040 | | |
4052 | 4041 | | |
4053 | 4042 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
524 | | - | |
525 | | - | |
526 | | - | |
| 524 | + | |
| 525 | + | |
527 | 526 | | |
528 | 527 | | |
529 | 528 | | |
| |||
0 commit comments