summaryrefslogtreecommitdiff
path: root/gxp-debugfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'gxp-debugfs.c')
-rw-r--r--gxp-debugfs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gxp-debugfs.c b/gxp-debugfs.c
index 8853c3b..a04a3f2 100644
--- a/gxp-debugfs.c
+++ b/gxp-debugfs.c
@@ -280,6 +280,11 @@ static int gxp_debugfs_coredump(void *data, u64 val)
struct gxp_dev *gxp = (struct gxp_dev *)data;
int core;
+ if (!gxp_debug_dump_is_enabled()) {
+ dev_err(gxp->dev, "Debug dump functionality is disabled\n");
+ return -EINVAL;
+ }
+
down_read(&gxp->vd_semaphore);
for (core = 0; core < GXP_NUM_CORES; core++) {