Skip to content

Commit

Permalink
ipc3: fixup alignment of ext data
Browse files Browse the repository at this point in the history
Use macro instead of harder to read math check.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
  • Loading branch information
cujomalainey committed Sep 11, 2024
1 parent 7dd2d7f commit 8608303
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc/ipc3/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp)
}

offset = comp->hdr.size - comp->ext_data_length;
if ((offset & 0x3) != 0) {
if (!IS_ALIGNED(offset, 4)) {
tr_err(&comp_tr, "Invalid ext data offset %lx", offset);
goto out;
}
Expand Down

0 comments on commit 8608303

Please sign in to comment.