diff options
author | Christophe Jaillet <christophe.jaillet@wanadoo.fr> | 2015-01-19 23:02:00 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-01-22 12:16:11 +0100 |
commit | 2ec504934e43e6c47dfdd4436ca58b36f1ab3218 (patch) | |
tree | 3ff61b46b5a25b6c43d804c9c9caabf8959d990b | |
parent | 93568d6fc509923db204320062b1883bc9962b0d (diff) | |
download | op-kernel-dev-2ec504934e43e6c47dfdd4436ca58b36f1ab3218.zip op-kernel-dev-2ec504934e43e6c47dfdd4436ca58b36f1ab3218.tar.gz |
s390/hmcdrv: free memory on error path
Free allocated page in case of error returned by hmcdrv_ftp_startup.
[heiko.carstens@de.ibm.com]: slightly changed Christophe's patch
Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.fr>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
-rw-r--r-- | drivers/s390/char/hmcdrv_ftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/char/hmcdrv_ftp.c b/drivers/s390/char/hmcdrv_ftp.c index 4bd6332..d4b61d9 100644 --- a/drivers/s390/char/hmcdrv_ftp.c +++ b/drivers/s390/char/hmcdrv_ftp.c @@ -200,10 +200,9 @@ int hmcdrv_ftp_probe(void) rc = hmcdrv_ftp_startup(); if (rc) - return rc; + goto out; rc = hmcdrv_ftp_do(&ftp); - free_page((unsigned long) ftp.buf); hmcdrv_ftp_shutdown(); switch (rc) { @@ -216,7 +215,8 @@ int hmcdrv_ftp_probe(void) rc = 0; /* clear length (success) */ break; } /* switch */ - +out: + free_page((unsigned long) ftp.buf); return rc; } EXPORT_SYMBOL(hmcdrv_ftp_probe); |