summaryrefslogtreecommitdiff
path: root/scripts/dtc/srcpos.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/dtc/srcpos.c')
-rw-r--r--scripts/dtc/srcpos.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/dtc/srcpos.c b/scripts/dtc/srcpos.c
index aa3aad04cec4..9d38459902f3 100644
--- a/scripts/dtc/srcpos.c
+++ b/scripts/dtc/srcpos.c
@@ -252,7 +252,7 @@ srcpos_string(struct srcpos *pos)
const char *fname = "<no-file>";
char *pos_str;
- if (pos)
+ if (pos->file && pos->file->name)
fname = pos->file->name;