summaryrefslogtreecommitdiffstats
path: root/sys/dev/ata/ata-all.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ata/ata-all.c')
-rw-r--r--sys/dev/ata/ata-all.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c
index 1ab81e4..024a158 100644
--- a/sys/dev/ata/ata-all.c
+++ b/sys/dev/ata/ata-all.c
@@ -1794,12 +1794,11 @@ ata_init(void)
{
/* register boot attach to be run when interrupts are enabled */
if (!(ata_delayed_attach = (struct intr_config_hook *)
- malloc(sizeof(struct intr_config_hook),
- M_TEMP, M_NOWAIT))) {
+ malloc(sizeof(struct intr_config_hook),
+ M_TEMP, M_NOWAIT | M_ZERO))) {
printf("ata: malloc of delayed attach hook failed\n");
return;
}
- bzero(ata_delayed_attach, sizeof(struct intr_config_hook));
ata_delayed_attach->ich_func = (void*)ata_boot_attach;
if (config_intrhook_establish(ata_delayed_attach) != 0) {
OpenPOWER on IntegriCloud