Skip to content

Commit 55aabb8

Browse files
dingtianhonghnaz
authored andcommitted
ubsan-dont-handle-misaligned-address-when-support-unaligned-access-v2
add braces around if block Cc: David Laight <[email protected]> Cc: Andrey Ryabinin <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent e1cf7f7 commit 55aabb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/ubsan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ void __ubsan_handle_type_mismatch(struct type_mismatch_data *data,
321321

322322
if (!ptr)
323323
handle_null_ptr_deref(data);
324-
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment))
324+
else if (data->alignment && !IS_ALIGNED(ptr, data->alignment)) {
325325
if (!IS_ENABLED(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS))
326326
handle_missaligned_access(data, ptr);
327-
else
327+
} else
328328
handle_object_size_mismatch(data, ptr);
329329
}
330330
EXPORT_SYMBOL(__ubsan_handle_type_mismatch);

0 commit comments

Comments
 (0)