aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dynamic_debug.c
diff options
context:
space:
mode:
authorTony Lindgren <[email protected]>2021-01-15 10:48:43 +0000
committerTony Lindgren <[email protected]>2021-01-15 10:48:43 +0000
commit715a1284d89a740b197b3bad5eb20d36a397382f (patch)
tree07ad2960ab66e56b3d1e151036262019a18e3df1 /lib/dynamic_debug.c
parentARM: dts; gta04: SPI panel chip select is active low (diff)
parentARM: OMAP2+: Fix suspcious RCU usage splats for omap_enter_idle_coupled (diff)
downloadkernel-715a1284d89a740b197b3bad5eb20d36a397382f.tar.gz
kernel-715a1284d89a740b197b3bad5eb20d36a397382f.zip
Merge branch 'cpuidle-fix' into fixes
Diffstat (limited to 'lib/dynamic_debug.c')
-rw-r--r--lib/dynamic_debug.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c
index bd7b3aaa93c3..c70d6347afa2 100644
--- a/lib/dynamic_debug.c
+++ b/lib/dynamic_debug.c
@@ -561,9 +561,14 @@ static int ddebug_exec_queries(char *query, const char *modname)
int dynamic_debug_exec_queries(const char *query, const char *modname)
{
int rc;
- char *qry = kstrndup(query, PAGE_SIZE, GFP_KERNEL);
+ char *qry; /* writable copy of query */
- if (!query)
+ if (!query) {
+ pr_err("non-null query/command string expected\n");
+ return -EINVAL;
+ }
+ qry = kstrndup(query, PAGE_SIZE, GFP_KERNEL);
+ if (!qry)
return -ENOMEM;
rc = ddebug_exec_queries(qry, modname);