OSDN Git Service

staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc'
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Sat, 20 Oct 2018 11:31:06 +0000 (13:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 7 Nov 2018 12:08:28 +0000 (13:08 +0100)
commit354e379684fcc70ab8d5450b4d57bd92b5294dfd
tree290f57de41dbf34bdb711b5b80c62c38edc8ce7f
parent4dc2a3cd27856531cf92762fea2eb9468efe552f
staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc'

Function 'mtk_hsdma_start_transfer' uses 'tx_desc' pointer which can be
dereferenced before it is initializated. Initializate pointer before
avoiding the problem.

Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-dma/mtk-hsdma.c