diff options
| author | Jiri Kosina <jkosina@suse.cz> | 2018-11-06 07:57:02 -0500 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.cz> | 2018-11-06 07:57:02 -0500 |
| commit | 0c7244209588630a9b45e52490ef1390e04499a6 (patch) | |
| tree | d60f5610f9b36ff05ed5202396c811628bacdb61 /drivers/fpga/xilinx-spi.c | |
| parent | 399474e4c1100bca264ed14fa3ad0d68fab484d8 (diff) | |
| parent | eb7046e9bf466cebfcfbcdf640e41d9e3a80086c (diff) | |
Merge branch 'master' into for-4.20/upstream-fixes
Pull in a merge commit that brought in 3b692c55e58d ("HID: asus: only
support backlight when it's not driven by WMI") so that fixup could be
applied on top of it.
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) | |||
| 144 | { | 144 | { |
| 145 | struct xilinx_spi_conf *conf; | 145 | struct xilinx_spi_conf *conf; |
| 146 | struct fpga_manager *mgr; | 146 | struct fpga_manager *mgr; |
| 147 | int ret; | ||
| 148 | 147 | ||
| 149 | conf = devm_kzalloc(&spi->dev, sizeof(*conf), GFP_KERNEL); | 148 | conf = devm_kzalloc(&spi->dev, sizeof(*conf), GFP_KERNEL); |
| 150 | if (!conf) | 149 | if (!conf) |
| @@ -167,18 +166,15 @@ static int xilinx_spi_probe(struct spi_device *spi) | |||
| 167 | return PTR_ERR(conf->done); | 166 | return PTR_ERR(conf->done); |
| 168 | } | 167 | } |
| 169 | 168 | ||
| 170 | mgr = fpga_mgr_create(&spi->dev, "Xilinx Slave Serial FPGA Manager", | 169 | mgr = devm_fpga_mgr_create(&spi->dev, |
| 171 | &xilinx_spi_ops, conf); | 170 | "Xilinx Slave Serial FPGA Manager", |
| 171 | &xilinx_spi_ops, conf); | ||
| 172 | if (!mgr) | 172 | if (!mgr) |
| 173 | return -ENOMEM; | 173 | return -ENOMEM; |
| 174 | 174 | ||
| 175 | spi_set_drvdata(spi, mgr); | 175 | spi_set_drvdata(spi, mgr); |
| 176 | 176 | ||
| 177 | ret = fpga_mgr_register(mgr); | 177 | return fpga_mgr_register(mgr); |
| 178 | if (ret) | ||
| 179 | fpga_mgr_free(mgr); | ||
| 180 | |||
| 181 | return ret; | ||
| 182 | } | 178 | } |
| 183 | 179 | ||
| 184 | static int xilinx_spi_remove(struct spi_device *spi) | 180 | static int xilinx_spi_remove(struct spi_device *spi) |
