Message ID | e8e419d4-cbf2-78e6-fb76-ec65a63bf5f6@users.sourceforge.net (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c index ed54147e3c60..5172115c4ef1 100644 --- a/arch/powerpc/kernel/nvram_64.c +++ b/arch/powerpc/kernel/nvram_64.c @@ -1173,9 +1173,10 @@ int __init nvram_scan_partitions(void) goto out; } tmp_part = kmalloc(sizeof(*tmp_part), GFP_KERNEL); - err = -ENOMEM; - if (!tmp_part) + if (!tmp_part) { + err = -ENOMEM; goto out; + } memcpy(&tmp_part->header, &phead, NVRAM_HEADER_LEN); tmp_part->index = cur_index;