swim: Release memory region after incorrect return/goto
PATCH 1/1 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.
---
Hey Geert.
Just in case you don't see this on lkml.
I presume this has to go through you.
drivers/block/swim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/block/swim.c +1 -1
@@ -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; }
Quoted 12 lines · Joe Perches
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_regionto be skipped.
Quoted 8 lines
Signed-off-by Joe Perches <[email protected]>Reviewed-by Laurent Vivier <[email protected]>---
Hey Geert.
Just in case you don't see this on lkml.
I presume this has to go through you.
Thanks, will apply and queue for 3.11.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds