Skip to content

Commit 2e29b99

Browse files
Wan Jiabingctmarinas
authored andcommitted
arm64/sme: Fix NULL check after kzalloc
Fix following coccicheck error: ./arch/arm64/kernel/process.c:322:2-23: alloc with no test, possible model on line 326 Here should be dst->thread.sve_state. Fixes: 8bd7f91 ("arm64/sme: Implement traps and syscall handling for SME") Signed-off-by: Wan Jiabing <[email protected]> Reviwed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 8a58bcd commit 2e29b99

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/arm64/kernel/process.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ int arch_dup_task_struct(struct task_struct *dst, struct task_struct *src)
321321
if (thread_za_enabled(&src->thread)) {
322322
dst->thread.sve_state = kzalloc(sve_state_size(src),
323323
GFP_KERNEL);
324-
if (!dst->thread.za_state)
324+
if (!dst->thread.sve_state)
325325
return -ENOMEM;
326326
dst->thread.za_state = kmemdup(src->thread.za_state,
327327
za_state_size(src),

0 commit comments

Comments
 (0)