mirror of
https://github.com/torvalds/linux.git
synced 2024-12-06 02:52:22 +00:00
ia64: sn: Use kmemdup rather than duplicating its implementation
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Tony Luck <tony.luck@intel.com>
This commit is contained in:
parent
ac0d1a48d8
commit
b82a3ecdc5
@ -150,12 +150,11 @@ struct sn_irq_info *sn_retarget_vector(struct sn_irq_info *sn_irq_info,
|
||||
* PROM does not support SAL_INTR_REDIRECT, or it failed.
|
||||
* Revert to old method.
|
||||
*/
|
||||
new_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_ATOMIC);
|
||||
new_irq_info = kmemdup(sn_irq_info, sizeof(struct sn_irq_info),
|
||||
GFP_ATOMIC);
|
||||
if (new_irq_info == NULL)
|
||||
return NULL;
|
||||
|
||||
memcpy(new_irq_info, sn_irq_info, sizeof(struct sn_irq_info));
|
||||
|
||||
/* Free the old PROM new_irq_info structure */
|
||||
sn_intr_free(local_nasid, local_widget, new_irq_info);
|
||||
unregister_intr_pda(new_irq_info);
|
||||
|
Loading…
Reference in New Issue
Block a user