Skip to content

Commit

Permalink
x86/platform/intel/mrst: Remove cast for kmalloc() return value
Browse files Browse the repository at this point in the history
Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: http://lkml.kernel.org/r/513EB5DA.2010300@cn.fujitsu.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Zhang Yanfei authored and Ingo Molnar committed Mar 12, 2013
1 parent e87b686 commit ad0304c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions arch/x86/platform/mrst/mrst.c
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,7 @@ 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 = (struct sfi_gpio_table_entry *)
kmalloc(num * sizeof(*pentry), GFP_KERNEL);
gpio_table = kmalloc(num * sizeof(*pentry), GFP_KERNEL);
if (!gpio_table)
return -1;
memcpy(gpio_table, pentry, num * sizeof(*pentry));
Expand Down

0 comments on commit ad0304c

Please sign in to comment.