diff options
Diffstat (limited to 'drivers/fpga/ts73xx-fpga.c')
-rw-r--r-- | drivers/fpga/ts73xx-fpga.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/fpga/ts73xx-fpga.c b/drivers/fpga/ts73xx-fpga.c index 08efd1895b1b..dc22a5842609 100644 --- a/drivers/fpga/ts73xx-fpga.c +++ b/drivers/fpga/ts73xx-fpga.c | |||
@@ -118,7 +118,6 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) | |||
118 | struct ts73xx_fpga_priv *priv; | 118 | struct ts73xx_fpga_priv *priv; |
119 | struct fpga_manager *mgr; | 119 | struct fpga_manager *mgr; |
120 | struct resource *res; | 120 | struct resource *res; |
121 | int ret; | ||
122 | 121 | ||
123 | priv = devm_kzalloc(kdev, sizeof(*priv), GFP_KERNEL); | 122 | priv = devm_kzalloc(kdev, sizeof(*priv), GFP_KERNEL); |
124 | if (!priv) | 123 | if (!priv) |
@@ -133,18 +132,14 @@ static int ts73xx_fpga_probe(struct platform_device *pdev) | |||
133 | return PTR_ERR(priv->io_base); | 132 | return PTR_ERR(priv->io_base); |
134 | } | 133 | } |
135 | 134 | ||
136 | mgr = fpga_mgr_create(kdev, "TS-73xx FPGA Manager", | 135 | mgr = devm_fpga_mgr_create(kdev, "TS-73xx FPGA Manager", |
137 | &ts73xx_fpga_ops, priv); | 136 | &ts73xx_fpga_ops, priv); |
138 | if (!mgr) | 137 | if (!mgr) |
139 | return -ENOMEM; | 138 | return -ENOMEM; |
140 | 139 | ||
141 | platform_set_drvdata(pdev, mgr); | 140 | platform_set_drvdata(pdev, mgr); |
142 | 141 | ||
143 | ret = fpga_mgr_register(mgr); | 142 | return fpga_mgr_register(mgr); |
144 | if (ret) | ||
145 | fpga_mgr_free(mgr); | ||
146 | |||
147 | return ret; | ||
148 | } | 143 | } |
149 | 144 | ||
150 | static int ts73xx_fpga_remove(struct platform_device *pdev) | 145 | static int ts73xx_fpga_remove(struct platform_device *pdev) |