@@ -382,7 +382,7 @@ static int spi_gpio_probe(struct platfor
return -ENODEV;
#endif
- master = spi_alloc_master(&pdev->dev, sizeof(*spi_gpio));
+ master = devm_spi_alloc_master(&pdev->dev, sizeof(*spi_gpio));
if (!master)
return -ENOMEM;
@@ -438,11 +438,7 @@ static int spi_gpio_probe(struct platfor
}
spi_gpio->bitbang.setup_transfer = spi_bitbang_setup_transfer;
- status = spi_bitbang_start(&spi_gpio->bitbang);
- if (status)
- spi_master_put(master);
-
- return status;
+ return spi_bitbang_start(&spi_gpio->bitbang);
}
static int spi_gpio_remove(struct platform_device *pdev)