summaryrefslogtreecommitdiffstats
path: root/drivers/target
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/target')
-rw-r--r--drivers/target/target_core_user.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/target/target_core_user.c b/drivers/target/target_core_user.c
index 1238480..60c8a87 100644
--- a/drivers/target/target_core_user.c
+++ b/drivers/target/target_core_user.c
@@ -1675,8 +1675,10 @@ static int tcmu_configure_device(struct se_device *dev)
udev->data_bitmap = kzalloc(BITS_TO_LONGS(udev->max_blocks) *
sizeof(unsigned long), GFP_KERNEL);
- if (!udev->data_bitmap)
+ if (!udev->data_bitmap) {
+ ret = -ENOMEM;
goto err_bitmap_alloc;
+ }
udev->mb_addr = vzalloc(CMDR_SIZE);
if (!udev->mb_addr) {
OpenPOWER on IntegriCloud