aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ehea/ehea_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ehea/ehea_main.c')
-rw-r--r--drivers/net/ehea/ehea_main.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c
index a333b42111b8..190fb691d20b 100644
--- a/drivers/net/ehea/ehea_main.c
+++ b/drivers/net/ehea/ehea_main.c
@@ -180,7 +180,7 @@ static void ehea_update_firmware_handles(void)
180 num_portres * EHEA_NUM_PORTRES_FW_HANDLES; 180 num_portres * EHEA_NUM_PORTRES_FW_HANDLES;
181 181
182 if (num_fw_handles) { 182 if (num_fw_handles) {
183 arr = kzalloc(num_fw_handles * sizeof(*arr), GFP_KERNEL); 183 arr = kcalloc(num_fw_handles, sizeof(*arr), GFP_KERNEL);
184 if (!arr) 184 if (!arr)
185 goto out; /* Keep the existing array */ 185 goto out; /* Keep the existing array */
186 } else 186 } else
@@ -265,7 +265,7 @@ static void ehea_update_bcmc_registrations(void)
265 } 265 }
266 266
267 if (num_registrations) { 267 if (num_registrations) {
268 arr = kzalloc(num_registrations * sizeof(*arr), GFP_ATOMIC); 268 arr = kcalloc(num_registrations, sizeof(*arr), GFP_ATOMIC);
269 if (!arr) 269 if (!arr)
270 goto out; /* Keep the existing array */ 270 goto out; /* Keep the existing array */
271 } else 271 } else
@@ -818,8 +818,6 @@ static void check_sqs(struct ehea_port *port)
818 } 818 }
819 } 819 }
820 } 820 }
821
822 return;
823} 821}
824 822
825 823
@@ -3721,7 +3719,7 @@ int __init ehea_module_init(void)
3721 if (ret) 3719 if (ret)
3722 ehea_info("failed registering memory remove notifier"); 3720 ehea_info("failed registering memory remove notifier");
3723 3721
3724 ret = crash_shutdown_register(&ehea_crash_handler); 3722 ret = crash_shutdown_register(ehea_crash_handler);
3725 if (ret) 3723 if (ret)
3726 ehea_info("failed registering crash handler"); 3724 ehea_info("failed registering crash handler");
3727 3725
@@ -3746,7 +3744,7 @@ out3:
3746out2: 3744out2:
3747 unregister_memory_notifier(&ehea_mem_nb); 3745 unregister_memory_notifier(&ehea_mem_nb);
3748 unregister_reboot_notifier(&ehea_reboot_nb); 3746 unregister_reboot_notifier(&ehea_reboot_nb);
3749 crash_shutdown_unregister(&ehea_crash_handler); 3747 crash_shutdown_unregister(ehea_crash_handler);
3750out: 3748out:
3751 return ret; 3749 return ret;
3752} 3750}
@@ -3759,7 +3757,7 @@ static void __exit ehea_module_exit(void)
3759 driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities); 3757 driver_remove_file(&ehea_driver.driver, &driver_attr_capabilities);
3760 ibmebus_unregister_driver(&ehea_driver); 3758 ibmebus_unregister_driver(&ehea_driver);
3761 unregister_reboot_notifier(&ehea_reboot_nb); 3759 unregister_reboot_notifier(&ehea_reboot_nb);
3762 ret = crash_shutdown_unregister(&ehea_crash_handler); 3760 ret = crash_shutdown_unregister(ehea_crash_handler);
3763 if (ret) 3761 if (ret)
3764 ehea_info("failed unregistering crash handler"); 3762 ehea_info("failed unregistering crash handler");
3765 unregister_memory_notifier(&ehea_mem_nb); 3763 unregister_memory_notifier(&ehea_mem_nb);