Commit ac61251
bnxt_en: Fix wrong return value check in bnxt_close_nic()
[ Upstream commit bd6781c ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>1 parent 8217f93 commit ac61251
5 files changed
Lines changed: 16 additions & 34 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10719 | 10719 | | |
10720 | 10720 | | |
10721 | 10721 | | |
10722 | | - | |
| 10722 | + | |
10723 | 10723 | | |
10724 | | - | |
10725 | | - | |
10726 | 10724 | | |
10727 | 10725 | | |
10728 | 10726 | | |
| |||
10737 | 10735 | | |
10738 | 10736 | | |
10739 | 10737 | | |
| 10738 | + | |
| 10739 | + | |
10740 | 10740 | | |
10741 | 10741 | | |
10742 | 10742 | | |
10743 | | - | |
10744 | | - | |
| 10743 | + | |
| 10744 | + | |
| 10745 | + | |
| 10746 | + | |
10745 | 10747 | | |
10746 | 10748 | | |
10747 | 10749 | | |
10748 | | - | |
10749 | 10750 | | |
10750 | 10751 | | |
10751 | 10752 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2343 | 2343 | | |
2344 | 2344 | | |
2345 | 2345 | | |
2346 | | - | |
| 2346 | + | |
2347 | 2347 | | |
2348 | 2348 | | |
2349 | 2349 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
483 | | - | |
484 | | - | |
485 | | - | |
486 | | - | |
487 | | - | |
488 | | - | |
489 | | - | |
| 481 | + | |
| 482 | + | |
490 | 483 | | |
491 | 484 | | |
492 | 485 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
168 | | - | |
169 | | - | |
| 167 | + | |
| 168 | + | |
170 | 169 | | |
171 | 170 | | |
172 | 171 | | |
| |||
956 | 955 | | |
957 | 956 | | |
958 | 957 | | |
959 | | - | |
960 | | - | |
961 | | - | |
962 | | - | |
963 | | - | |
964 | | - | |
| 958 | + | |
965 | 959 | | |
966 | 960 | | |
967 | 961 | | |
| |||
3634 | 3628 | | |
3635 | 3629 | | |
3636 | 3630 | | |
3637 | | - | |
3638 | | - | |
3639 | | - | |
3640 | | - | |
3641 | | - | |
3642 | | - | |
| 3631 | + | |
3643 | 3632 | | |
3644 | 3633 | | |
3645 | 3634 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
506 | 506 | | |
507 | 507 | | |
508 | 508 | | |
509 | | - | |
510 | | - | |
511 | | - | |
| 509 | + | |
| 510 | + | |
512 | 511 | | |
513 | 512 | | |
514 | 513 | | |
| |||
0 commit comments