]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/x86/platform/intel-mid/sfi.c
Merge remote-tracking branch 'mvebu/for-next'
[karo-tx-linux.git] / arch / x86 / platform / intel-mid / sfi.c
index ce992e8cc06526c4e61f1efb1b852e0f41df9ccf..5ee360a951ce7d59c74738491c8711f2f8fc1446 100644 (file)
@@ -197,10 +197,9 @@ static int __init sfi_parse_gpio(struct sfi_table_header *table)
        num = SFI_GET_NUM_ENTRIES(sb, struct sfi_gpio_table_entry);
        pentry = (struct sfi_gpio_table_entry *)sb->pentry;
 
-       gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
+       gpio_table = kmemdup(pentry, num * sizeof(*pentry), GFP_KERNEL);
        if (!gpio_table)
                return -1;
-       memcpy(gpio_table, pentry, num * sizeof(*pentry));
        gpio_num_entry = num;
 
        pr_debug("GPIO pin info:\n");