]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/acpi/ec.c
Merge branches 'bugzilla-14668' and 'misc-2.6.35' into release
[net-next-2.6.git] / drivers / acpi / ec.c
index 3f01f065b533134324ce00f8e910b89885e10b4a..5f2027d782e8134642d777225f4c37f6120b214f 100644 (file)
@@ -1037,10 +1037,9 @@ int __init acpi_ec_ecdt_probe(void)
                /* Don't trust ECDT, which comes from ASUSTek */
                if (!EC_FLAGS_VALIDATE_ECDT)
                        goto install;
-               saved_ec = kmalloc(sizeof(struct acpi_ec), GFP_KERNEL);
+               saved_ec = kmemdup(boot_ec, sizeof(struct acpi_ec), GFP_KERNEL);
                if (!saved_ec)
                        return -ENOMEM;
-               memcpy(saved_ec, boot_ec, sizeof(struct acpi_ec));
        /* fall through */
        }