diff options
-rw-r--r-- | arch/ppc64/kernel/nvram.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/ppc64/kernel/nvram.c b/arch/ppc64/kernel/nvram.c index 4e71781a4414..4fb1a9f5060d 100644 --- a/arch/ppc64/kernel/nvram.c +++ b/arch/ppc64/kernel/nvram.c | |||
@@ -338,9 +338,8 @@ static int nvram_remove_os_partition(void) | |||
338 | */ | 338 | */ |
339 | static int nvram_create_os_partition(void) | 339 | static int nvram_create_os_partition(void) |
340 | { | 340 | { |
341 | struct list_head * p; | 341 | struct nvram_partition *part; |
342 | struct nvram_partition *part = NULL; | 342 | struct nvram_partition *new_part; |
343 | struct nvram_partition *new_part = NULL; | ||
344 | struct nvram_partition *free_part = NULL; | 343 | struct nvram_partition *free_part = NULL; |
345 | int seq_init[2] = { 0, 0 }; | 344 | int seq_init[2] = { 0, 0 }; |
346 | loff_t tmp_index; | 345 | loff_t tmp_index; |
@@ -349,8 +348,7 @@ static int nvram_create_os_partition(void) | |||
349 | 348 | ||
350 | /* Find a free partition that will give us the maximum needed size | 349 | /* Find a free partition that will give us the maximum needed size |
351 | If can't find one that will give us the minimum size needed */ | 350 | If can't find one that will give us the minimum size needed */ |
352 | list_for_each(p, &nvram_part->partition) { | 351 | list_for_each_entry(part, &nvram_part->partition, partition) { |
353 | part = list_entry(p, struct nvram_partition, partition); | ||
354 | if (part->header.signature != NVRAM_SIG_FREE) | 352 | if (part->header.signature != NVRAM_SIG_FREE) |
355 | continue; | 353 | continue; |
356 | 354 | ||