aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/target_core_user.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target/target_core_user.c')
-rw-r--r--drivers/target/target_core_user.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 94b183efd236..7f96dfa32b9c 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1717,8 +1717,9 @@ static int tcmu_configure_device(struct se_device *dev)
info = &udev->uio_info;
- udev->data_bitmap = kzalloc(BITS_TO_LONGS(udev->max_blocks) *
- sizeof(unsigned long), GFP_KERNEL);
+ udev->data_bitmap = kcalloc(BITS_TO_LONGS(udev->max_blocks),
+ sizeof(unsigned long),
+ GFP_KERNEL);
if (!udev->data_bitmap) {
ret = -ENOMEM;
goto err_bitmap_alloc;