diff options
author | Julia Lawall <julia@diku.dk> | 2011-08-20 02:12:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-08-22 18:28:42 -0400 |
commit | 5006b313283c56cfda498513b7091692bcd74433 (patch) | |
tree | cca23211ee397c25bbec4f2da1aced3ba0862ad5 /sound | |
parent | 96101bd0bf7974686f6875c065a7a9a83cd2107a (diff) |
sound/soc/ep93xx/ep93xx-i2s.c: add missing kfree
Introduce a new label that includes kfree and jump to that one.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
identifier x;
expression E1!=0,E2,E3,E4;
statement S;
iterator I;
@@
(
if (...) { ... when != kfree(x)
when != x = E3
when != E3 = x
* return ...;
}
... when != x = E2
when != I(...,x,...) S
if (...) { ... when != x = E4
kfree(x); ... return ...; }
)
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Alexander Sverdlin <subaparts@yandex.ru>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/ep93xx/ep93xx-i2s.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/ep93xx/ep93xx-i2s.c b/sound/soc/ep93xx/ep93xx-i2s.c index 56efa0c1c9a9..099614e16651 100644 --- a/sound/soc/ep93xx/ep93xx-i2s.c +++ b/sound/soc/ep93xx/ep93xx-i2s.c | |||
@@ -385,14 +385,14 @@ static int ep93xx_i2s_probe(struct platform_device *pdev) | |||
385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 385 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
386 | if (!res) { | 386 | if (!res) { |
387 | err = -ENODEV; | 387 | err = -ENODEV; |
388 | goto fail; | 388 | goto fail_free_info; |
389 | } | 389 | } |
390 | 390 | ||
391 | info->mem = request_mem_region(res->start, resource_size(res), | 391 | info->mem = request_mem_region(res->start, resource_size(res), |
392 | pdev->name); | 392 | pdev->name); |
393 | if (!info->mem) { | 393 | if (!info->mem) { |
394 | err = -EBUSY; | 394 | err = -EBUSY; |
395 | goto fail; | 395 | goto fail_free_info; |
396 | } | 396 | } |
397 | 397 | ||
398 | info->regs = ioremap(info->mem->start, resource_size(info->mem)); | 398 | info->regs = ioremap(info->mem->start, resource_size(info->mem)); |
@@ -435,6 +435,7 @@ fail_unmap_mem: | |||
435 | iounmap(info->regs); | 435 | iounmap(info->regs); |
436 | fail_release_mem: | 436 | fail_release_mem: |
437 | release_mem_region(info->mem->start, resource_size(info->mem)); | 437 | release_mem_region(info->mem->start, resource_size(info->mem)); |
438 | fail_free_info: | ||
438 | kfree(info); | 439 | kfree(info); |
439 | fail: | 440 | fail: |
440 | return err; | 441 | return err; |