From 1a23466c69177204e38f0d710bca41965dee67b3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 10 Nov 2015 06:06:08 +0000 Subject: [PATCH] qla2x00t: Follow-up for r6635 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@6652 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- qla2x00t/qla_nx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qla2x00t/qla_nx.c b/qla2x00t/qla_nx.c index 6978785de..db309bd6a 100644 --- a/qla2x00t/qla_nx.c +++ b/qla2x00t/qla_nx.c @@ -1222,7 +1222,11 @@ qla82xx_pinit_from_rom(scsi_qla_host_t *vha) ql_log(ql_log_info, vha, 0x0072, "%d CRB init values found in ROM.\n", n); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 4, 0) buf = kmalloc_array(n, sizeof(struct crb_addr_pair), GFP_KERNEL); +#else + buf = kmalloc(n * sizeof(struct crb_addr_pair), GFP_KERNEL); +#endif if (buf == NULL) { ql_log(ql_log_fatal, vha, 0x010c, "Unable to allocate memory.\n");