Re: [PATCH v2] mt7601u: check memory allocation failure

2017-08-21 Thread Jakub Kicinski
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:

Re: [PATCH v2] mt7601u: check memory allocation failure

2017-08-21 Thread Jakub Kicinski
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:

[PATCH v2] mt7601u: check memory allocation failure

2017-08-21 Thread Christophe JAILLET
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 --- v2: avoid another NULL

[PATCH v2] mt7601u: check memory allocation failure

2017-08-21 Thread Christophe JAILLET
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 --- v2: avoid another NULL pointer dereference in