summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-gpio.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2019-10-08 19:12:28 +0100
committerMark Brown <broonie@kernel.org>2019-10-08 19:12:28 +0100
commit2b60d727cb2e059e0569b937e742e93423ae1541 (patch)
tree6e16732ab66073675f848df1c98a76b067b60882 /drivers/spi/spi-gpio.c
parentd6b71dfaeeba115dd61a7f367cf04c2d0ca77ebb (diff)
parentf6910679e17ad4915f008bd2c614d38052426f7c (diff)
Merge branch 'for-5.4' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.5
Diffstat (limited to 'drivers/spi/spi-gpio.c')
-rw-r--r--drivers/spi/spi-gpio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
index 42f4d82e9c5a..7ceb0ba27b75 100644
--- a/drivers/spi/spi-gpio.c
+++ b/drivers/spi/spi-gpio.c
@@ -368,8 +368,10 @@ static int spi_gpio_probe(struct platform_device *pdev)
return -ENOMEM;
status = devm_add_action_or_reset(&pdev->dev, spi_gpio_put, master);
- if (status)
+ if (status) {
+ spi_master_put(master);
return status;
+ }
if (pdev->dev.of_node)
status = spi_gpio_probe_dt(pdev, master);