.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /******************************************************************************* |
---|
2 | 3 | * Filename: target_core_rd.c |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * (c) Copyright 2003-2013 Datera, Inc. |
---|
8 | 9 | * |
---|
9 | 10 | * Nicholas A. Bellinger <nab@kernel.org> |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of the GNU General Public License as published by |
---|
13 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
14 | | - * (at your option) any later version. |
---|
15 | | - * |
---|
16 | | - * This program is distributed in the hope that it will be useful, |
---|
17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
19 | | - * GNU General Public License for more details. |
---|
20 | | - * |
---|
21 | | - * You should have received a copy of the GNU General Public License |
---|
22 | | - * along with this program; if not, write to the Free Software |
---|
23 | | - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
---|
24 | 11 | * |
---|
25 | 12 | ******************************************************************************/ |
---|
26 | 13 | |
---|
.. | .. |
---|
144 | 131 | if (sg_per_table < total_sg_needed) |
---|
145 | 132 | chain_entry = 1; |
---|
146 | 133 | |
---|
147 | | - sg = kcalloc(sg_per_table + chain_entry, sizeof(*sg), |
---|
| 134 | + sg = kmalloc_array(sg_per_table + chain_entry, sizeof(*sg), |
---|
148 | 135 | GFP_KERNEL); |
---|
149 | 136 | if (!sg) |
---|
150 | 137 | return -ENOMEM; |
---|