diff options
author | Joe Perches <joe@perches.com> | 2013-06-04 20:34:35 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-06-24 19:44:19 +0200 |
commit | 957d6bf665462eb1e94f7c23b4bdf20a83fea4b2 (patch) | |
tree | 28ecf7f0230285508ca061a6f0c565b1fc1e389d /drivers/block | |
parent | m68k/irq: Vector ints need a valid interrupt handler (diff) | |
download | linux-957d6bf665462eb1e94f7c23b4bdf20a83fea4b2.tar.xz linux-957d6bf665462eb1e94f7c23b4bdf20a83fea4b2.zip |
swim: Release memory region after incorrect return/goto
The code uses
return foo;
goto err_type;
when instead the form should have been
ret = foo;
goto err_type;
Here this causes a useful release_mem_region to be skipped.
Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: Laurent Vivier <Laurent@Vivier.EU>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/swim.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 2f445b7a174e..8ed6ccb748cf 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -893,7 +893,7 @@ static int swim_probe(struct platform_device *dev) swim_base = ioremap(res->start, resource_size(res)); if (!swim_base) { - return -ENOMEM; + ret = -ENOMEM; goto out_release_io; } |