author: Andrew Scull <ascull@google.com> 2021-03-18 14:33:09 +0000
committer: Marc Zyngier <maz@kernel.org> 2021-04-01 09:54:37 +0100
commit: 5b8be5d875a996776708ba174fcd08c8bcd721a5
parent: 26dbc7e299c7ebbb6a95e2c620b21b5280b37c57
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 3 deletions
diff --git a/lib/bug.c b/lib/bug.c
index e65398082cbc..45a0584f6541 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -130,9 +130,6 @@ static inline struct bug_entry *module_find_bug(unsigned long bugaddr)
void bug_get_file_line(struct bug_entry *bug, const char **file,
unsigned int *line)
{
- *file = NULL;
- *line = 0;
-
#ifdef CONFIG_DEBUG_BUGVERBOSE
#ifndef CONFIG_GENERIC_BUG_RELATIVE_POINTERS
*file = bug->file;
@@ -140,6 +137,9 @@ void bug_get_file_line(struct bug_entry *bug, const char **file,
*file = (const char *)bug + bug->file_disp;
#endif
*line = bug->line;
+#else
+ *file = NULL;
+ *line = 0;
#endif
}