hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/target/target_core_rd.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*******************************************************************************
23 * Filename: target_core_rd.c
34 *
....@@ -7,20 +8,6 @@
78 * (c) Copyright 2003-2013 Datera, Inc.
89 *
910 * 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.
2411 *
2512 ******************************************************************************/
2613
....@@ -144,7 +131,7 @@
144131 if (sg_per_table < total_sg_needed)
145132 chain_entry = 1;
146133
147
- sg = kcalloc(sg_per_table + chain_entry, sizeof(*sg),
134
+ sg = kmalloc_array(sg_per_table + chain_entry, sizeof(*sg),
148135 GFP_KERNEL);
149136 if (!sg)
150137 return -ENOMEM;