diff options
author | Mark Brown <broonie@kernel.org> | 2021-06-01 18:33:33 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-01 18:33:33 +0100 |
commit | 1a435466b0d470eb9095da0efefea5f7f69acf9c (patch) | |
tree | a661a705f8236cf7bd86ff250de2f627c9f0a333 /drivers/spi/spi-pxa2xx.c | |
parent | 5cb4e1f33e5eeadbce3814282e010d4dd31816af (diff) | |
parent | 2ec6f20b33eb4f62ab90bdcd620436c883ec3af6 (diff) |
Merge branch 'for-5.13' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi into spi-5.14
Diffstat (limited to 'drivers/spi/spi-pxa2xx.c')
-rw-r--r-- | drivers/spi/spi-pxa2xx.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index bdf9a283efc3..974e30744b83 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1250,6 +1250,7 @@ static int setup(struct spi_device *spi) struct driver_data *drv_data = spi_controller_get_devdata(spi->controller); uint tx_thres, tx_hi_thres, rx_thres; + int err; switch (drv_data->ssp_type) { case QUARK_X1000_SSP: @@ -1410,7 +1411,11 @@ static int setup(struct spi_device *spi) if (drv_data->ssp_type == CE4100_SSP) return 0; - return setup_cs(spi, chip, chip_info); + err = setup_cs(spi, chip, chip_info); + if (err) + kfree(chip); + + return err; } static void cleanup(struct spi_device *spi) |