Skip to content

Commit 35d516b

Browse files
tititiou36broonie
authored andcommitted
spi: mxic: Fix an error handling path in mxic_spi_probe()
If spi_register_master() fails, we must undo a previous mxic_spi_mem_ecc_probe() call, as already done in the remove function. Fixes: 00360eb ("spi: mxic: Add support for pipelined ECC operations") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/r/09c81f751241f6ec0bac7a48d4ec814a742e0d17.1648980664.git.christophe.jaillet@wanadoo.fr Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 2f8cf5f commit 35d516b

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

drivers/spi/spi-mxic.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ static int mxic_spi_probe(struct platform_device *pdev)
813813
if (ret) {
814814
dev_err(&pdev->dev, "spi_register_master failed\n");
815815
pm_runtime_disable(&pdev->dev);
816+
mxic_spi_mem_ecc_remove(mxic);
816817
}
817818

818819
return ret;

0 commit comments

Comments
 (0)