diff options
Diffstat (limited to 'drivers/leds/leds-88pm860x.c')
-rw-r--r-- | drivers/leds/leds-88pm860x.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/leds/leds-88pm860x.c b/drivers/leds/leds-88pm860x.c index b7e8cc0957fc..6be2edd41173 100644 --- a/drivers/leds/leds-88pm860x.c +++ b/drivers/leds/leds-88pm860x.c | |||
@@ -165,15 +165,13 @@ static int pm860x_led_probe(struct platform_device *pdev) | |||
165 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "control"); | 165 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "control"); |
166 | if (!res) { | 166 | if (!res) { |
167 | dev_err(&pdev->dev, "No REG resource for control\n"); | 167 | dev_err(&pdev->dev, "No REG resource for control\n"); |
168 | ret = -ENXIO; | 168 | return -ENXIO; |
169 | goto out; | ||
170 | } | 169 | } |
171 | data->reg_control = res->start; | 170 | data->reg_control = res->start; |
172 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "blink"); | 171 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "blink"); |
173 | if (!res) { | 172 | if (!res) { |
174 | dev_err(&pdev->dev, "No REG resource for blink\n"); | 173 | dev_err(&pdev->dev, "No REG resource for blink\n"); |
175 | ret = -ENXIO; | 174 | return -ENXIO; |
176 | goto out; | ||
177 | } | 175 | } |
178 | data->reg_blink = res->start; | 176 | data->reg_blink = res->start; |
179 | memset(data->name, 0, MFD_NAME_SIZE); | 177 | memset(data->name, 0, MFD_NAME_SIZE); |
@@ -224,9 +222,6 @@ static int pm860x_led_probe(struct platform_device *pdev) | |||
224 | } | 222 | } |
225 | pm860x_led_set(&data->cdev, 0); | 223 | pm860x_led_set(&data->cdev, 0); |
226 | return 0; | 224 | return 0; |
227 | out: | ||
228 | devm_kfree(&pdev->dev, data); | ||
229 | return ret; | ||
230 | } | 225 | } |
231 | 226 | ||
232 | static int pm860x_led_remove(struct platform_device *pdev) | 227 | static int pm860x_led_remove(struct platform_device *pdev) |