Skip to content

Commit c6d336a

Browse files
cujomalaineylgirdwood
authored andcommitted
ipc3: fixup alignment of ext data
Use macro instead of harder to read math check. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
1 parent d7c0b55 commit c6d336a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ipc/ipc3/helper.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ static const struct comp_driver *get_drv(struct sof_ipc_comp *comp)
114114
}
115115

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

0 commit comments

Comments
 (0)