* [PATCH] swim: Release memory region after incorrect return/goto
@ 2013-06-04 18:34 Joe Perches
2013-06-04 18:53 ` Geert Uytterhoeven
0 siblings, 1 reply; 2+ messages in thread
From: Joe Perches @ 2013-06-04 18:34 UTC (permalink / raw)
To: Geert Uytterhoeven; +Cc: linux-m68k, Laurent Vivier
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>
---
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(-)
diff --git a/drivers/block/swim.c b/drivers/block/swim.c
index 2f445b7..8ed6ccb 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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] swim: Release memory region after incorrect return/goto
2013-06-04 18:34 [PATCH] swim: Release memory region after incorrect return/goto Joe Perches
@ 2013-06-04 18:53 ` Geert Uytterhoeven
0 siblings, 0 replies; 2+ messages in thread
From: Geert Uytterhoeven @ 2013-06-04 18:53 UTC (permalink / raw)
To: Joe Perches; +Cc: linux-m68k, Laurent Vivier
On Tue, Jun 4, 2013 at 8:34 PM, Joe Perches <joe@perches.com> wrote:
> 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>
> ---
>
> 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 -- geert@linux-m68k.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-04 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-04 18:34 [PATCH] swim: Release memory region after incorrect return/goto Joe Perches
2013-06-04 18:53 ` Geert Uytterhoeven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox