diff options
Diffstat (limited to 'drivers/xen/xen-scsiback.c')
-rw-r--r-- | drivers/xen/xen-scsiback.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/xen/xen-scsiback.c b/drivers/xen/xen-scsiback.c index ad4eb1024d1f..51387d75c7bf 100644 --- a/drivers/xen/xen-scsiback.c +++ b/drivers/xen/xen-scsiback.c | |||
@@ -939,12 +939,12 @@ out: | |||
939 | spin_unlock_irqrestore(&info->v2p_lock, flags); | 939 | spin_unlock_irqrestore(&info->v2p_lock, flags); |
940 | 940 | ||
941 | out_free: | 941 | out_free: |
942 | mutex_lock(&tpg->tv_tpg_mutex); | 942 | if (err) { |
943 | tpg->tv_tpg_fe_count--; | 943 | mutex_lock(&tpg->tv_tpg_mutex); |
944 | mutex_unlock(&tpg->tv_tpg_mutex); | 944 | tpg->tv_tpg_fe_count--; |
945 | 945 | mutex_unlock(&tpg->tv_tpg_mutex); | |
946 | if (err) | ||
947 | kfree(new); | 946 | kfree(new); |
947 | } | ||
948 | 948 | ||
949 | return err; | 949 | return err; |
950 | } | 950 | } |