From: Joe Perches Date: Tue, 4 Jun 2013 18:34:35 +0000 (-0700) Subject: swim: Release memory region after incorrect return/goto X-Git-Tag: next-20130617~107^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2240cee33b441eef204c9e1f77555a07f16eb59c;p=karo-tx-linux.git 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 Reviewed-by: Laurent Vivier Signed-off-by: Geert Uytterhoeven --- 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; }