]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
spi: dw-pci: free previously allocated IRQs if desc->setup() fails
authorJay Fang <f.fangjian@huawei.com>
Tue, 15 Sep 2020 01:22:49 +0000 (09:22 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:22 +0000 (10:07 +0100)
commit71452513b06b265df003425b16e7b2a182224148
tree7b1600d49e4240fec1011ca38a523406f6429b78
parent31a31b30b0f67cd773f72c00fa3ed66004df3378
spi: dw-pci: free previously allocated IRQs if desc->setup() fails

[ Upstream commit 9599f341889c87e56bb944659c32490d05e2532f ]

Free previously allocated IRQs when return an error code of desc->setup()
which is not always successful. And simplify the code by adding a goto
label.

Fixes: 8f5c285f3ef5 ("SPI: designware: pci: Switch over to MSI interrupts")
CC: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Jay Fang <f.fangjian@huawei.com>
Link: https://lore.kernel.org/r/1600132969-53037-1-git-send-email-f.fangjian@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/spi/spi-dw-pci.c