aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ipmi/ipmi_msghandler.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/ipmi/ipmi_msghandler.c')
-rw-r--r--drivers/char/ipmi/ipmi_msghandler.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/ipmi/ipmi_msghandler.c b/drivers/char/ipmi/ipmi_msghandler.c
index b5df7e61aeb2..6a01dd9e43f8 100644
--- a/drivers/char/ipmi/ipmi_msghandler.c
+++ b/drivers/char/ipmi/ipmi_msghandler.c
@@ -2639,10 +2639,9 @@ int ipmi_register_smi(struct ipmi_smi_handlers *handlers,
2639 return -ENODEV; 2639 return -ENODEV;
2640 } 2640 }
2641 2641
2642 intf = kmalloc(sizeof(*intf), GFP_KERNEL); 2642 intf = kzalloc(sizeof(*intf), GFP_KERNEL);
2643 if (!intf) 2643 if (!intf)
2644 return -ENOMEM; 2644 return -ENOMEM;
2645 memset(intf, 0, sizeof(*intf));
2646 2645
2647 intf->ipmi_version_major = ipmi_version_major(device_id); 2646 intf->ipmi_version_major = ipmi_version_major(device_id);
2648 intf->ipmi_version_minor = ipmi_version_minor(device_id); 2647 intf->ipmi_version_minor = ipmi_version_minor(device_id);