diff options
| author | James Morris <james.morris@microsoft.com> | 2018-11-12 20:07:41 +0300 |
|---|---|---|
| committer | James Morris <james.morris@microsoft.com> | 2018-11-12 20:07:41 +0300 |
| commit | 26b76320a8a550472bbb8f42257df83fcb8d8df6 (patch) | |
| tree | 8a5b569f4f070bf4971e24e7fccfe3004b8fc4ba /drivers/fpga/xilinx-spi.c | |
| parent | f09c296ebf407f98f4ca70892e612b54484bf663 (diff) | |
| parent | ccda4af0f4b92f7b4c308d3acc262f4a7e3affad (diff) | |
| download | linux-26b76320a8a550472bbb8f42257df83fcb8d8df6.tar.xz | |
Merge tag 'v4.20-rc2' into next-general
Sync to Linux 4.20-rc2 for downstream developers.
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) |
