]> Git Repo - linux.git/blobdiff - drivers/hwtracing/coresight/coresight-cpu-debug.c
regmap: mmio: Allow passing an empty config->reg_stride
[linux.git] / drivers / hwtracing / coresight / coresight-cpu-debug.c
index 8845ec4b4402aa7d725f0f9e4f08025ad8280180..1874df7c6a7369f8f52f3f8c13e2455c2b68e7bf 100644 (file)
@@ -380,9 +380,10 @@ static int debug_notifier_call(struct notifier_block *self,
        int cpu;
        struct debug_drvdata *drvdata;
 
-       mutex_lock(&debug_lock);
+       /* Bail out if we can't acquire the mutex or the functionality is off */
+       if (!mutex_trylock(&debug_lock))
+               return NOTIFY_DONE;
 
-       /* Bail out if the functionality is disabled */
        if (!debug_enable)
                goto skip_dump;
 
@@ -401,7 +402,7 @@ static int debug_notifier_call(struct notifier_block *self,
 
 skip_dump:
        mutex_unlock(&debug_lock);
-       return 0;
+       return NOTIFY_DONE;
 }
 
 static struct notifier_block debug_notifier = {
This page took 0.032632 seconds and 4 git commands to generate.