Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi: fsl: Call irq_dispose_mapping in err path

Irq_dispose_mapping should be called in err path to release
the resources that irq_of_parse_and_map requested.

Signed-off-by: Liu Xiang <liu.xiang6@zte.com.cn>
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Liu Xiang and committed by
Mark Brown
500a32ab fafd6794

+2 -1
+2 -1
drivers/spi/spi-fsl-spi.c
··· 813 813 struct device_node *np = ofdev->dev.of_node; 814 814 struct spi_master *master; 815 815 struct resource mem; 816 - int irq, type; 816 + int irq = 0, type; 817 817 int ret = -ENOMEM; 818 818 819 819 ret = of_mpc8xxx_spi_probe(ofdev); ··· 846 846 return 0; 847 847 848 848 err: 849 + irq_dispose_mapping(irq); 849 850 if (type == TYPE_FSL) 850 851 of_fsl_spi_free_chipselects(dev); 851 852 return ret;