diff options
| author | Swetha Chikkaboraiah <schikk@codeaurora.org> | 2020-03-02 10:55:12 +0530 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2020-05-21 23:57:59 -0700 |
| commit | 6dbab77b6ddda309f56027f135f1eede33b76c2c (patch) | |
| tree | 1d6202db5896c0cd90b44962678ebfafec402362 /drivers/misc/lkdtm.c | |
| parent | 5a6566f225652a01f17f062b4fa91f269e49014a (diff) | |
kernel: Fix build errors with LLVM
This patch intends to fix compilation errors
while building kernel with LLVM toolchain.
Change-Id: I76c4f97d8a0efb44434d54fb07cae23b050d2003
Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
Diffstat (limited to 'drivers/misc/lkdtm.c')
| -rw-r--r-- | drivers/misc/lkdtm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/lkdtm.c b/drivers/misc/lkdtm.c index 8e06e1020ad9..849592f45889 100644 --- a/drivers/misc/lkdtm.c +++ b/drivers/misc/lkdtm.c @@ -381,6 +381,7 @@ static void execute_user_location(void *dst) static void lkdtm_do_action(enum ctype which) { + int *ptr = NULL; switch (which) { case CT_PANIC: panic("dumptest"); @@ -392,7 +393,7 @@ static void lkdtm_do_action(enum ctype which) WARN_ON(1); break; case CT_EXCEPTION: - *((int *) 0) = 0; + *ptr = 0; break; case CT_LOOP: for (;;) |
