diff options
| author | Tony Lindgren <tony@atomide.com> | 2018-11-08 09:32:24 -0800 |
|---|---|---|
| committer | Tony Lindgren <tony@atomide.com> | 2018-11-08 09:32:24 -0800 |
| commit | 91e43395820baad80248987608216c35da9df65b (patch) | |
| tree | 29d41d1a036eb1abd6a60f16ad37aa578acd8159 /drivers/fpga/xilinx-spi.c | |
| parent | eef3dc34a1e0b01d53328b88c25237bcc7323777 (diff) | |
| parent | cec83ff1241ec98113a19385ea9e9cfa9aa4125b (diff) | |
Merge branch 'fixes-dts' into omap-for-v4.20/fixes
Diffstat (limited to 'drivers/fpga/xilinx-spi.c')
| -rw-r--r-- | drivers/fpga/xilinx-spi.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/fpga/xilinx-spi.c b/drivers/fpga/xilinx-spi.c index 8d1945966533..469486be20c4 100644 --- a/drivers/fpga/xilinx-spi.c +++ b/drivers/fpga/xilinx-spi.c @@ -144,7 +144,6 @@ static int xilinx_spi_probe(struct spi_device *spi) { struct xilinx_spi_conf *conf; struct fpga_manager *mgr; - int ret; conf = devm_kzalloc(&spi->dev, sizeof(*conf), GFP_KERNEL); if (!conf) @@ -167,18 +166,15 @@ static int xilinx_spi_probe(struct spi_device *spi) return PTR_ERR(conf->done); } - mgr = fpga_mgr_create(&spi->dev, "Xilinx Slave Serial FPGA Manager", - &xilinx_spi_ops, conf); + mgr = devm_fpga_mgr_create(&spi->dev, + "Xilinx Slave Serial FPGA Manager", + &xilinx_spi_ops, conf); if (!mgr) return -ENOMEM; spi_set_drvdata(spi, mgr); - ret = fpga_mgr_register(mgr); - if (ret) - fpga_mgr_free(mgr); - - return ret; + return fpga_mgr_register(mgr); } static int xilinx_spi_remove(struct spi_device *spi) |
