mt7601u: check memory allocation failure
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Mon, 21 Aug 2017 22:06:17 +0000 (00:06 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Thu, 24 Aug 2017 09:54:33 +0000 (12:54 +0300)
commitb3b2f62c6238808f74e00767a3224f9be54d606f
tree51ed02119ee7bb77507b16cd31a08836c98bc60d
parentd9ee6015e573176e599693b6d0125ad74b210623
mt7601u: check memory allocation failure

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 <christophe.jaillet@wanadoo.fr>
Acked-by: Jakub Kicinski <kubakici@wp.pl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/mediatek/mt7601u/dma.c