diff options
author | Kalesh AP <[email protected]> | 2023-12-07 16:16:57 -0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-12-08 17:20:26 -0800 |
commit | bd6781c18cb5b5e5d8c5873fa9a51668e89ec76e (patch) | |
tree | 5446b8c91d48ce422b995ebe789e1054784a2429 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | aded5d1feb08e48d544845d3594d70c4d5fe6e54 (diff) |
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: c0c050c58d84 ("bnxt_en: New Broadcom ethernet driver.")
Reviewed-by: Andy Gospodarek <[email protected]>
Reviewed-by: Vikas Gupta <[email protected]>
Reviewed-by: Somnath Kotur <[email protected]>
Signed-off-by: Kalesh AP <[email protected]>
Signed-off-by: Michael Chan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions