Skip to content

Commit 8cef9b4

Browse files
tititiou36broonie
authored andcommitted
spi: microchip-core: Fix an error handling path in mchp_corespi_probe()
mchp_corespi_init() calls mchp_corespi_enable_ints(), so mchp_corespi_disable_ints() should be called if an error occurs after calling mchp_corespi_init(), as already done in the remove function. Fixes: 059f545 ("spi: add support for microchip "soft" spi controller") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/a7aaff1f28a83303a288de2914724a874fe1a11e.1764969247.git.christophe.jaillet@wanadoo.fr Acked-by: Conor Dooley <conor.dooley@microchip.com> Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent e1f2e77 commit 8cef9b4

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/spi/spi-microchip-core-spi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ static int mchp_corespi_probe(struct platform_device *pdev)
387387

388388
ret = devm_spi_register_controller(dev, host);
389389
if (ret) {
390+
mchp_corespi_disable_ints(spi);
390391
mchp_corespi_disable(spi);
391392
return dev_err_probe(dev, ret, "unable to register host for CoreSPI controller\n");
392393
}

0 commit comments

Comments
 (0)