diff options
Diffstat (limited to 'drivers/target/target_core_sbc.c')
-rw-r--r-- | drivers/target/target_core_sbc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/target/target_core_sbc.c b/drivers/target/target_core_sbc.c index dfb6603eab4..5c822fdc8f6 100644 --- a/drivers/target/target_core_sbc.c +++ b/drivers/target/target_core_sbc.c @@ -375,7 +375,8 @@ static sense_reason_t compare_and_write_callback(struct se_cmd *cmd) buf = kzalloc(cmd->data_length, GFP_KERNEL); if (!buf) { pr_err("Unable to allocate compare_and_write buf\n"); - return TCM_OUT_OF_RESOURCES; + ret = TCM_OUT_OF_RESOURCES; + goto out; } write_sg = kzalloc(sizeof(struct scatterlist) * cmd->t_data_nents, |