linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drivers/scsi/scsi_debug.c: add missing vfrees
@ 2012-04-29 20:14 Julia Lawall
  0 siblings, 0 replies; only message in thread
From: Julia Lawall @ 2012-04-29 20:14 UTC (permalink / raw)
  To: James E.J. Bottomley; +Cc: kernel-janitors, linux-scsi, linux-kernel

From: Julia Lawall <Julia.Lawall@lip6.fr>

Free dif_storep and fake_storep on failure as done in nearby error-handling
code.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>

---
 drivers/scsi/scsi_debug.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 182d5a5..16e44f8 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -3393,7 +3393,8 @@ static int __init scsi_debug_init(void)
 			printk(KERN_ERR
 			       "%s: ERR: unmap_granularity < unmap_alignment\n",
 			       __func__);
-			return -EINVAL;
+			ret = -EINVAL;
+			goto free_vm;
 		}
 
 		map_size = (sdebug_store_sectors / scsi_debug_unmap_granularity);


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-29 20:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-29 20:14 [PATCH] drivers/scsi/scsi_debug.c: add missing vfrees Julia Lawall

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).