Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea56505b authored by Philippe De Muyter's avatar Philippe De Muyter Committed by Jens Axboe
Browse files

partitions/efi.c: replace useless kzalloc's by kmalloc's



In alloc_read_gpt_entries and alloc_read_gpt_header, the kzalloc'ated
zones are either totally overwritten by the following read_lba call,
or freed.  As kmalloc is cheaper than kzalloc, use kmalloc.

Signed-off-by: default avatarPhilippe De Muyter <phdm@macqel.be>
Cc: Matt Domsch <Matt_Domsch@dell.com>
Cc: Panagiotis Issaris <takis@issaris.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 6f8f5c26
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -238,7 +238,7 @@ static gpt_entry *alloc_read_gpt_entries(struct parsed_partitions *state,
                le32_to_cpu(gpt->sizeof_partition_entry);
	if (!count)
		return NULL;
	pte = kzalloc(count, GFP_KERNEL);
	pte = kmalloc(count, GFP_KERNEL);
	if (!pte)
		return NULL;

@@ -267,7 +267,7 @@ static gpt_header *alloc_read_gpt_header(struct parsed_partitions *state,
	gpt_header *gpt;
	unsigned ssz = bdev_logical_block_size(state->bdev);

	gpt = kzalloc(ssz, GFP_KERNEL);
	gpt = kmalloc(ssz, GFP_KERNEL);
	if (!gpt)
		return NULL;