Skip to content

Commit

Permalink
nospec: Fix a NULL dereference
Browse files Browse the repository at this point in the history
We've started marking assembly as __inline as in "asm __inline volatile ("
and Smatch can't handle that.  The latest upstream Sparse apparently
parses this correctly so I will have to update to that.

Signed-off-by: Dan Carpenter <[email protected]>
  • Loading branch information
Dan Carpenter committed Sep 19, 2019
1 parent 2cca2d8 commit bebc1eb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions check_nospec.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ static int is_nospec_asm(struct statement *stmt)

if (!stmt || stmt->type != STMT_ASM)
return 0;
if (!stmt->asm_string)
return 0;
macro = get_macro_name(stmt->asm_string->pos);
if (!macro || strcmp(macro, "CALL_NOSPEC") != 0)
return 0;
Expand Down

0 comments on commit bebc1eb

Please sign in to comment.