wil6210: fix _desc access in __wil_tx_vring_tso

_desc is defined in __wil_tx_vring_tso() and may not be set in
case len is 0, verify _desc is set.

Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
Alexei Avshalom Lazar 2019-04-26 18:43:30 +03:00 committed by Kalle Valo
parent e10b0eddd5
commit 9c64659792

View File

@ -1761,6 +1761,9 @@ static int __wil_tx_vring_tso(struct wil6210_priv *wil, struct wil6210_vif *vif,
}
}
if (!_desc)
goto mem_error;
/* first descriptor may also be the last.
* in this case d pointer is invalid
*/