spi: bcm-qspi: fIX some error handling paths

For some reason, commit c0368e4db4 ("spi: bcm-qspi: Fix use after free
in bcm_qspi_probe() in error path") has updated some gotos, but not all of
them.

This looks spurious, so fix it.

Fixes: fa236a7ef2 ("spi: bcm-qspi: Add Broadcom MSPI driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Christophe Jaillet 2018-03-13 19:36:58 +01:00 committed by Mark Brown
parent 7928b2cbe5
commit bc3cc75281
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -1247,7 +1247,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
qspi->base[MSPI] = devm_ioremap_resource(dev, res);
if (IS_ERR(qspi->base[MSPI])) {
ret = PTR_ERR(qspi->base[MSPI]);
goto qspi_probe_err;
goto qspi_resource_err;
}
} else {
goto qspi_resource_err;
@ -1258,7 +1258,7 @@ int bcm_qspi_probe(struct platform_device *pdev,
qspi->base[BSPI] = devm_ioremap_resource(dev, res);
if (IS_ERR(qspi->base[BSPI])) {
ret = PTR_ERR(qspi->base[BSPI]);
goto qspi_probe_err;
goto qspi_resource_err;
}
qspi->bspi_mode = true;
} else {