Skip to content

Commit

Permalink
depinfo: Fix build warning
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Gladkov <[email protected]>
  • Loading branch information
legionus committed Aug 14, 2024
1 parent a62c12b commit cfcff4c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/depinfo/kmod-depinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ is_kernel_builtin_match(const char *str)
static int
append_kernel_builtin(char *name)
{
struct kernel_builtin *new, *next, *last;
struct kernel_builtin *new, *next, *last = NULL;

if (kbuiltin) {
last = next = kbuiltin;
Expand All @@ -115,7 +115,8 @@ append_kernel_builtin(char *name)
return 0;
}

last->next = new;
if (last)
last->next = new;
return 0;
}

Expand Down

0 comments on commit cfcff4c

Please sign in to comment.