We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0a9964 commit c9e69c8Copy full SHA for c9e69c8
arch/x86/platform/intel-mid/sfi.c
@@ -197,10 +197,9 @@ static int __init sfi_parse_gpio(struct sfi_table_header *table)
197
num = SFI_GET_NUM_ENTRIES(sb, struct sfi_gpio_table_entry);
198
pentry = (struct sfi_gpio_table_entry *)sb->pentry;
199
200
- gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
+ gpio_table = kmemdup(pentry, num * sizeof(*pentry), GFP_KERNEL);
201
if (!gpio_table)
202
return -1;
203
- memcpy(gpio_table, pentry, num * sizeof(*pentry));
204
gpio_num_entry = num;
205
206
pr_debug("GPIO pin info:\n");
0 commit comments