]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: dw-mid: avoid potential NULL dereference
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 2 Mar 2015 18:15:58 +0000 (20:15 +0200)
committerSasha Levin <sasha.levin@oracle.com>
Sat, 28 Mar 2015 13:49:22 +0000 (09:49 -0400)
commitf3aa910546efe131b46ee2b7721a473b7b6938bc
tree9a7d0db8888fe4baeb0108cbd19f6859d135e82e
parentfbafcf8fb1f46e46e8f5882be2fdf6428f6f6801
spi: dw-mid: avoid potential NULL dereference

[ Upstream commit c9dafb27c84412fe4b17c3b94cc4ffeef5df1833 ]

When DMA descriptor allocation fails we should not try to assign any fields in
the bad descriptor. The patch adds the necessary checks for that.

Fixes: 7063c0d942a1 (spi/dw_spi: add DMA support)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/spi/spi-dw-mid.c