diff options
Diffstat (limited to 'drivers/target/target_core_tmr.c')
-rw-r--r-- | drivers/target/target_core_tmr.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/target/target_core_tmr.c b/drivers/target/target_core_tmr.c index 59b8b9c5ad7..179063d81cd 100644 --- a/drivers/target/target_core_tmr.c +++ b/drivers/target/target_core_tmr.c | |||
@@ -75,10 +75,16 @@ void core_tmr_release_req( | |||
75 | { | 75 | { |
76 | struct se_device *dev = tmr->tmr_dev; | 76 | struct se_device *dev = tmr->tmr_dev; |
77 | 77 | ||
78 | if (!dev) { | ||
79 | kmem_cache_free(se_tmr_req_cache, tmr); | ||
80 | return; | ||
81 | } | ||
82 | |||
78 | spin_lock(&dev->se_tmr_lock); | 83 | spin_lock(&dev->se_tmr_lock); |
79 | list_del(&tmr->tmr_list); | 84 | list_del(&tmr->tmr_list); |
80 | kmem_cache_free(se_tmr_req_cache, tmr); | ||
81 | spin_unlock(&dev->se_tmr_lock); | 85 | spin_unlock(&dev->se_tmr_lock); |
86 | |||
87 | kmem_cache_free(se_tmr_req_cache, tmr); | ||
82 | } | 88 | } |
83 | 89 | ||
84 | static void core_tmr_handle_tas_abort( | 90 | static void core_tmr_handle_tas_abort( |