diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index 42da7a30072943a5c2a1b706b8f8150b5c44f053..1520dd2dd7184912a99bffe9abfe20f33c6ab527 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3546,10 +3546,12 @@ EXPORT_SYMBOL(transport_kmap_data_sg); void transport_kunmap_data_sg(struct se_cmd *cmd) { - if (!cmd->t_data_nents) + if (!cmd->t_data_nents) { return; - else if (cmd->t_data_nents == 1) + } else if (cmd->t_data_nents == 1) { kunmap(sg_page(cmd->t_data_sg)); + return; + } vunmap(cmd->t_data_vmap); cmd->t_data_vmap = NULL;