diff options
Diffstat (limited to 'drivers/edac/edac_pci.c')
-rw-r--r-- | drivers/edac/edac_pci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/edac/edac_pci.c b/drivers/edac/edac_pci.c index 63af1c5673d1..f1ac86649886 100644 --- a/drivers/edac/edac_pci.c +++ b/drivers/edac/edac_pci.c | |||
@@ -42,13 +42,13 @@ struct edac_pci_ctl_info *edac_pci_alloc_ctl_info(unsigned int sz_pvt, | |||
42 | const char *edac_pci_name) | 42 | const char *edac_pci_name) |
43 | { | 43 | { |
44 | struct edac_pci_ctl_info *pci; | 44 | struct edac_pci_ctl_info *pci; |
45 | void *pvt; | 45 | void *p = NULL, *pvt; |
46 | unsigned int size; | 46 | unsigned int size; |
47 | 47 | ||
48 | debugf1("%s()\n", __func__); | 48 | debugf1("%s()\n", __func__); |
49 | 49 | ||
50 | pci = (struct edac_pci_ctl_info *)0; | 50 | pci = edac_align_ptr(&p, sizeof(*pci), 1); |
51 | pvt = edac_align_ptr(&pci[1], sz_pvt); | 51 | pvt = edac_align_ptr(&p, 1, sz_pvt); |
52 | size = ((unsigned long)pvt) + sz_pvt; | 52 | size = ((unsigned long)pvt) + sz_pvt; |
53 | 53 | ||
54 | /* Alloc the needed control struct memory */ | 54 | /* Alloc the needed control struct memory */ |