diff options
author | Jingoo Han <jg1.han@samsung.com> | 2012-12-17 19:00:57 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-17 20:15:16 -0500 |
commit | 3a1f9462dbdf4d671f2f21290d507d1ae89d141a (patch) | |
tree | df5d0093bd45d4ae4823878ddc0545e68690b1b3 /drivers/video/backlight/88pm860x_bl.c | |
parent | 3c48d1f2539cf3a42adc5fe4f77950eeb28bef3b (diff) |
drivers/video/backlight/88pm860x_bl.c: drop devm_kfree of devm_kzalloc'd data
devm_kfree() allocates memory that is released when a driver detaches.
Thus, there is no reason to explicitly call devm_kfree() in probe or remove
functions.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/88pm860x_bl.c')
-rw-r--r-- | drivers/video/backlight/88pm860x_bl.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/video/backlight/88pm860x_bl.c b/drivers/video/backlight/88pm860x_bl.c index 6e509d995093..bb21412547a9 100644 --- a/drivers/video/backlight/88pm860x_bl.c +++ b/drivers/video/backlight/88pm860x_bl.c | |||
@@ -208,22 +208,19 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
208 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "duty cycle"); | 208 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "duty cycle"); |
209 | if (!res) { | 209 | if (!res) { |
210 | dev_err(&pdev->dev, "No REG resource for duty cycle\n"); | 210 | dev_err(&pdev->dev, "No REG resource for duty cycle\n"); |
211 | ret = -ENXIO; | 211 | return -ENXIO; |
212 | goto out; | ||
213 | } | 212 | } |
214 | data->reg_duty_cycle = res->start; | 213 | data->reg_duty_cycle = res->start; |
215 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "always on"); | 214 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "always on"); |
216 | if (!res) { | 215 | if (!res) { |
217 | dev_err(&pdev->dev, "No REG resorce for always on\n"); | 216 | dev_err(&pdev->dev, "No REG resorce for always on\n"); |
218 | ret = -ENXIO; | 217 | return -ENXIO; |
219 | goto out; | ||
220 | } | 218 | } |
221 | data->reg_always_on = res->start; | 219 | data->reg_always_on = res->start; |
222 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "current"); | 220 | res = platform_get_resource_byname(pdev, IORESOURCE_REG, "current"); |
223 | if (!res) { | 221 | if (!res) { |
224 | dev_err(&pdev->dev, "No REG resource for current\n"); | 222 | dev_err(&pdev->dev, "No REG resource for current\n"); |
225 | ret = -ENXIO; | 223 | return -ENXIO; |
226 | goto out; | ||
227 | } | 224 | } |
228 | data->reg_current = res->start; | 225 | data->reg_current = res->start; |
229 | 226 | ||
@@ -263,8 +260,6 @@ static int pm860x_backlight_probe(struct platform_device *pdev) | |||
263 | return 0; | 260 | return 0; |
264 | out_brt: | 261 | out_brt: |
265 | backlight_device_unregister(bl); | 262 | backlight_device_unregister(bl); |
266 | out: | ||
267 | devm_kfree(&pdev->dev, data); | ||
268 | return ret; | 263 | return ret; |
269 | } | 264 | } |
270 | 265 | ||