]> git.baikalelectronics.ru Git - kernel.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)
committerMark Brown <broonie@kernel.org>
Thu, 17 Sep 2020 18:56:04 +0000 (19:56 +0100)
commit48871cdc6f91f586f53cda4564ef4e38d170b876
tree22b2c9af738b65648bffe72d7be82a9aeb4519d2
parent4a8e531a91318aa5a37a4c20322ed60e670f1e5a
spi: dw-pci: free previously allocated IRQs if desc->setup() fails

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: 9ae5ee43d00f ("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>
drivers/spi/spi-dw-pci.c