Source
210
210
211
211
/**
212
212
* Double the capacity of the EST table
213
213
*
214
214
* @returns 0 if ok, < 0 errno no error.
215
215
*/
216
216
static
217
217
int uwb_est_grow(void)
218
218
{
219
219
size_t actual_size = uwb_est_size * sizeof(uwb_est[0]);
220
-
void *new = kmalloc(2 * actual_size, GFP_ATOMIC);
220
+
void *new = kmalloc_array(2, actual_size, GFP_ATOMIC);
221
221
if (new == NULL)
222
222
return -ENOMEM;
223
223
memcpy(new, uwb_est, actual_size);
224
224
memset(new + actual_size, 0, actual_size);
225
225
kfree(uwb_est);
226
226
uwb_est = new;
227
227
uwb_est_size *= 2;
228
228
return 0;
229
229
}
230
230