Message ID | 20240705-dev-spi-xcomm-gpiochip-v2-2-b10842fc9636@analog.com |
---|---|
State | New |
Headers | show |
Series | spi: xcomm: support GPO pin | expand |
diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c index 063ce75af6504..5bbc250bc0534 100644 --- a/drivers/spi/spi-xcomm.c +++ b/drivers/spi/spi-xcomm.c @@ -248,7 +248,7 @@ static int spi_xcomm_probe(struct i2c_client *i2c) struct spi_controller *host; int ret; - host = spi_alloc_host(&i2c->dev, sizeof(*spi_xcomm)); + host = devm_spi_alloc_host(&i2c->dev, sizeof(*spi_xcomm)); if (!host) return -ENOMEM; @@ -265,7 +265,7 @@ static int spi_xcomm_probe(struct i2c_client *i2c) ret = devm_spi_register_controller(&i2c->dev, host); if (ret < 0) - spi_controller_put(host); + return ret; return spi_xcomm_gpio_add(spi_xcomm); }