[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <567AE389.1030803@users.sourceforge.net>
Date: Wed, 23 Dec 2015 19:10:17 +0100
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: linux-ntfs-dev@...ts.sourceforge.net, linux-block@...r.kernel.org,
Jens Axboe <axboe@...nel.dk>, Richard Russon <ldm@...tcap.org>
Cc: Julia Lawall <julia.lawall@...6.fr>,
LKML <linux-kernel@...r.kernel.org>,
kernel-janitors@...r.kernel.org
Subject: [PATCH 3/5] block-LDM: One function call less in ldm_partition()
after error detection
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Wed, 23 Dec 2015 13:32:51 +0100
Let us return directly if a memory allocation failed.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
block/partitions/ldm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/partitions/ldm.c b/block/partitions/ldm.c
index 856658a..3118d24 100644
--- a/block/partitions/ldm.c
+++ b/block/partitions/ldm.c
@@ -1512,7 +1512,7 @@ int ldm_partition(struct parsed_partitions *state)
ldb = kmalloc (sizeof (*ldb), GFP_KERNEL);
if (!ldb)
- goto out;
+ return -1;
/* Parse and check privheads. */
if (!ldm_validate_privheads(state, &ldb->ph))
--
2.6.3
--
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