[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1421704920-29820-1-git-send-email-christophe.jaillet@wanadoo.fr>
Date: Mon, 19 Jan 2015 23:02:00 +0100
From: Christophe Jaillet <christophe.jaillet@...adoo.fr>
To: schwidefsky@...ibm.com, heiko.carstens@...ibm.com,
rhoppe@...ibm.com, linux390@...ibm.com
Cc: linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org,
Christophe Jaillet <christophe.jaillet@...adoo.fr>
Subject: [PATCH] s390: char: Free memory on error path.
Free allocated page in case of error returned by hmcdrv_ftp_startup.
Signed-off-by: Christophe Jaillet <christophe.jaillet@...adoo.fr>
---
drivers/s390/char/hmcdrv_ftp.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/s390/char/hmcdrv_ftp.c b/drivers/s390/char/hmcdrv_ftp.c
index 4bd6332..f6e00af 100644
--- a/drivers/s390/char/hmcdrv_ftp.c
+++ b/drivers/s390/char/hmcdrv_ftp.c
@@ -199,8 +199,10 @@ int hmcdrv_ftp_probe(void)
rc = hmcdrv_ftp_startup();
- if (rc)
+ if (rc) {
+ free_page((unsigned long) ftp.buf);
return rc;
+ }
rc = hmcdrv_ftp_do(&ftp);
free_page((unsigned long) ftp.buf);
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists