|
@@ -506,7 +506,7 @@ add_system_map_addresses(struct parisc_device *dev, int num_addrs,
|
|
long status;
|
|
long status;
|
|
struct pdc_system_map_addr_info addr_result;
|
|
struct pdc_system_map_addr_info addr_result;
|
|
|
|
|
|
- dev->addr = kmalloc(num_addrs * sizeof(unsigned long), GFP_KERNEL);
|
|
|
|
|
|
+ dev->addr = kmalloc_array(num_addrs, sizeof(*dev->addr), GFP_KERNEL);
|
|
if(!dev->addr) {
|
|
if(!dev->addr) {
|
|
printk(KERN_ERR "%s %s(): memory allocation failure\n",
|
|
printk(KERN_ERR "%s %s(): memory allocation failure\n",
|
|
__FILE__, __func__);
|
|
__FILE__, __func__);
|