]> git.karo-electronics.de Git - karo-tx-linux.git/commit
swim: Release memory region after incorrect return/goto
authorJoe Perches <joe@perches.com>
Tue, 4 Jun 2013 18:34:35 +0000 (11:34 -0700)
committerGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 16 Jun 2013 12:02:28 +0000 (14:02 +0200)
commit2240cee33b441eef204c9e1f77555a07f16eb59c
tree0ebb3182b10de921171065a0334b886691bb1fd7
parentbef7947fc680df51c3eb712c4fdc521adb4c0389
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>
drivers/block/swim.c