]> Git Repo - linux.git/commit
kunit: debugfs: Use IS_ERR() for alloc_string_stream() error check
authorKuan-Wei Chiu <[email protected]>
Thu, 14 Nov 2024 16:55:58 +0000 (00:55 +0800)
committerShuah Khan <[email protected]>
Tue, 19 Nov 2024 22:18:13 +0000 (15:18 -0700)
commit95b6d723a00710f129b81556c93fdd994c105ab1
treeb007cb90e22e593be7f03e34b38c24a4dcd5db38
parent435c20eed572a95709b1536ff78832836b2f91b1
kunit: debugfs: Use IS_ERR() for alloc_string_stream() error check

The alloc_string_stream() function only returns ERR_PTR(-ENOMEM) on
failure and never returns NULL. Therefore, switching the error check in
the caller from IS_ERR_OR_NULL to IS_ERR improves clarity, indicating
that this function will return an error pointer (not NULL) when an
error occurs. This change avoids any ambiguity regarding the function's
return behavior.

Link: https://lore.kernel.org/lkml/Zy9deU5VK3YR+r9N@visitorckw-System-Product-Name
Signed-off-by: Kuan-Wei Chiu <[email protected]>
Reviewed-by: David Gow <[email protected]>
Signed-off-by: Shuah Khan <[email protected]>
lib/kunit/debugfs.c
This page took 0.076062 seconds and 4 git commands to generate.