We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5211070 commit e8ba259Copy full SHA for e8ba259
drivers/spi/spi-xcomm.c
@@ -248,7 +248,7 @@ static int spi_xcomm_probe(struct i2c_client *i2c)
248
struct spi_controller *host;
249
int ret;
250
251
- host = spi_alloc_host(&i2c->dev, sizeof(*spi_xcomm));
+ host = devm_spi_alloc_host(&i2c->dev, sizeof(*spi_xcomm));
252
if (!host)
253
return -ENOMEM;
254
@@ -265,7 +265,7 @@ static int spi_xcomm_probe(struct i2c_client *i2c)
265
266
ret = devm_spi_register_controller(&i2c->dev, host);
267
if (ret < 0)
268
- spi_controller_put(host);
+ return ret;
269
270
return spi_xcomm_gpio_add(spi_xcomm);
271
}
0 commit comments