kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] s390: char: Free memory on error path.
@ 2015-01-19 22:02 Christophe Jaillet
  2015-01-19 22:06 ` Christophe JAILLET
  2015-01-20 10:30 ` Heiko Carstens
  0 siblings, 2 replies; 3+ messages in thread
From: Christophe Jaillet @ 2015-01-19 22:02 UTC (permalink / raw)
  To: schwidefsky, heiko.carstens, rhoppe, linux390
  Cc: linux-s390, linux-kernel, kernel-janitors, Christophe Jaillet

Free allocated page in case of error returned by hmcdrv_ftp_startup.

Signed-off-by: Christophe Jaillet <christophe.jaillet@wanadoo.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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-20 10:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-19 22:02 [PATCH] s390: char: Free memory on error path Christophe Jaillet
2015-01-19 22:06 ` Christophe JAILLET
2015-01-20 10:30 ` Heiko Carstens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).