aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwtracing/intel_th/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwtracing/intel_th/core.c b/drivers/hwtracing/intel_th/core.c
index da962aa2cef5..4e70ecee2103 100644
--- a/drivers/hwtracing/intel_th/core.c
+++ b/drivers/hwtracing/intel_th/core.c
@@ -139,7 +139,8 @@ static int intel_th_remove(struct device *dev)
139 th->thdev[i] = NULL; 139 th->thdev[i] = NULL;
140 } 140 }
141 141
142 th->num_thdevs = lowest; 142 if (lowest >= 0)
143 th->num_thdevs = lowest;
143 } 144 }
144 145
145 if (thdrv->attr_group) 146 if (thdrv->attr_group)