Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET <redacted>
---
v2: avoid another NULL pointer dereference in 'mt7601u_free_tx()' if the
allocation had failed.
---
drivers/net/wireless/mediatek/mt7601u/dma.c | 5 +++++
1 file changed, 5 insertions(+)
From: Jakub Kicinski <hidden> Date: 2017-08-21 22:25:25
On Tue, 22 Aug 2017 00:06:17 +0200, Christophe JAILLET wrote:
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET <redacted>
From: Kalle Valo <hidden> Date: 2017-08-24 09:55:46
Christophe Jaillet [off-list ref] wrote:
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET <redacted>
Acked-by: Jakub Kicinski <redacted>
From: Kalle Valo <hidden> Date: 2017-08-24 09:55:49
Christophe Jaillet [off-list ref] wrote:
Check memory allocation failure and return -ENOMEM in such a case, as
already done a few lines below.
As 'dev->tx_q' can be NULL, we also need to check for that in
'mt7601u_free_tx()', and return early.
Signed-off-by: Christophe JAILLET <redacted>
Acked-by: Jakub Kicinski <redacted>