Skip to contentSkip to conversation

drivers/net/ethernet/intel/e100: Check the return value of e100_exec_cmd()

PATCH New Li Zhong 1 participant 1 message Sep 18, 2022

Subsystems (3)
lore
Share & tools
lore

Li Zhong

author
#0 lore raw

PATCH 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 be error when the command execution fail.

---
 drivers/net/ethernet/intel/e100.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/net/ethernet/intel/e100.c +6 -1
index 11a884aa5082..f785dd73d537 100644
@@ -1903,6 +1903,8 @@ static int e100_alloc_cbs(struct nic *nic)
 
 static inline void e100_start_receiver(struct nic *nic, struct rx *rx)
 {
+	int err;
+
 	if (!nic->rxs) return;
 	if (RU_SUSPENDED != nic->ru_running) return;
 
@@ -1911,7 +1913,10 @@ 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);
+		err = e100_exec_cmd(nic, ruc_start, rx->dma_addr);
+		if (err)
+			return;
+
 		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