drivers/net/ethernet/intel/e100: check the return value of e100_exec_cmd()
Subsystems (3)
PATCH v2 1/1 drivers/net/ethernet/intel/e100: check the return value of e100_exec_cmd()
Check the return value of e100_exec_cmd() which could return error code when execution fails.
Signed-off-by Li Zhong <[email protected]>
--- drivers/net/ethernet/intel/e100.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/e100.c +3 -1
@@ -1911,7 +1911,9 @@ static inline void e100_start_receiver(struct nic *nic, struct rx *rx)/* (Re)start RU if suspended or idle and RFA is non-NULL */ if (rx->skb) { -e100_exec_cmd (nic, ruc_start, rx->dma_addr); +if (e100_exec_cmd (nic, ruc_start, rx->dma_addr)) +netif_printk (nic, tx_err,KERN_DEBUG , nic->netdev, +"exec ruc_start failed\n" ); nic->ru_running =RU_RUNNING ; } }
Signature · 6 lines
2.25.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Jakub Kicinski
maintainerQuoted 2 lines · On Fri, 16 Sep 2022 17:10:27 -0700 Li Zhong wrote:
Check the return value of
e100_exec_cmd()which could return error code when execution fails.
You need to provide more detailed analysis in the commit message. Right now it looks like you're just blindly finding cases where return value is not checked and adding error checks. This is as likely to fix something as it is to break.
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan