|
@@ -311,11 +311,10 @@ static boolean DAC960_CreateAuxiliaryStructures(DAC960_Controller_T *Controller)
|
|
CommandsRemaining = CommandAllocationGroupSize;
|
|
CommandsRemaining = CommandAllocationGroupSize;
|
|
CommandGroupByteCount =
|
|
CommandGroupByteCount =
|
|
CommandsRemaining * CommandAllocationLength;
|
|
CommandsRemaining * CommandAllocationLength;
|
|
- AllocationPointer = kmalloc(CommandGroupByteCount, GFP_ATOMIC);
|
|
|
|
|
|
+ AllocationPointer = kzalloc(CommandGroupByteCount, GFP_ATOMIC);
|
|
if (AllocationPointer == NULL)
|
|
if (AllocationPointer == NULL)
|
|
return DAC960_Failure(Controller,
|
|
return DAC960_Failure(Controller,
|
|
"AUXILIARY STRUCTURE CREATION");
|
|
"AUXILIARY STRUCTURE CREATION");
|
|
- memset(AllocationPointer, 0, CommandGroupByteCount);
|
|
|
|
}
|
|
}
|
|
Command = (DAC960_Command_T *) AllocationPointer;
|
|
Command = (DAC960_Command_T *) AllocationPointer;
|
|
AllocationPointer += CommandAllocationLength;
|
|
AllocationPointer += CommandAllocationLength;
|
|
@@ -2709,14 +2708,12 @@ DAC960_DetectController(struct pci_dev *PCI_Device,
|
|
void __iomem *BaseAddress;
|
|
void __iomem *BaseAddress;
|
|
int i;
|
|
int i;
|
|
|
|
|
|
- Controller = (DAC960_Controller_T *)
|
|
|
|
- kmalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC);
|
|
|
|
|
|
+ Controller = kzalloc(sizeof(DAC960_Controller_T), GFP_ATOMIC);
|
|
if (Controller == NULL) {
|
|
if (Controller == NULL) {
|
|
DAC960_Error("Unable to allocate Controller structure for "
|
|
DAC960_Error("Unable to allocate Controller structure for "
|
|
"Controller at\n", NULL);
|
|
"Controller at\n", NULL);
|
|
return NULL;
|
|
return NULL;
|
|
}
|
|
}
|
|
- memset(Controller, 0, sizeof(DAC960_Controller_T));
|
|
|
|
Controller->ControllerNumber = DAC960_ControllerCount;
|
|
Controller->ControllerNumber = DAC960_ControllerCount;
|
|
DAC960_Controllers[DAC960_ControllerCount++] = Controller;
|
|
DAC960_Controllers[DAC960_ControllerCount++] = Controller;
|
|
Controller->Bus = PCI_Device->bus->number;
|
|
Controller->Bus = PCI_Device->bus->number;
|