summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/stm/policy.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hwtracing/stm/policy.c')
-rw-r--r--drivers/hwtracing/stm/policy.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c
index 8bc90432ae69..5e51bed0787b 100644
--- a/drivers/hwtracing/stm/policy.c
+++ b/drivers/hwtracing/stm/policy.c
@@ -454,8 +454,7 @@ stp_policy_make(struct config_group *group, const char *name)
err = stm_lookup_protocol(proto, &pdrv, &pdrv_node_type);
kfree(devname);
- /* We don't have any protocol drivers yet */
- if (err != -ENOENT) {
+ if (err) {
stm_put_device(stm);
return ERR_PTR(-ENODEV);
}