Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ca19fcb6 authored by Aditya Pakki's avatar Aditya Pakki Committed by David S. Miller
Browse files

net: chelsio: Add a missing check on cudg_get_buffer



cudbg_collect_hw_sched() could fail when the function cudg_get_buffer()
returns an error. The fix adds a check to the latter function returning
error on failure

Signed-off-by: default avatarAditya Pakki <pakki001@umn.edu>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f0fb9b28
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1229,6 +1229,10 @@ int cudbg_collect_hw_sched(struct cudbg_init *pdbg_init,

	rc = cudbg_get_buff(pdbg_init, dbg_buff, sizeof(struct cudbg_hw_sched),
			    &temp_buff);

	if (rc)
		return rc;

	hw_sched_buff = (struct cudbg_hw_sched *)temp_buff.data;
	hw_sched_buff->map = t4_read_reg(padap, TP_TX_MOD_QUEUE_REQ_MAP_A);
	hw_sched_buff->mode = TIMERMODE_G(t4_read_reg(padap, TP_MOD_CONFIG_A));