summaryrefslogtreecommitdiffstats
path: root/lib/kunit/string-stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kunit/string-stream.c')
-rw-r--r--lib/kunit/string-stream.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/kunit/string-stream.c b/lib/kunit/string-stream.c
index a6f3616c20..54f4fdcbfa 100644
--- a/lib/kunit/string-stream.c
+++ b/lib/kunit/string-stream.c
@@ -173,7 +173,7 @@ void string_stream_destroy(struct string_stream *stream)
{
KUNIT_STATIC_STUB_REDIRECT(string_stream_destroy, stream);
- if (!stream)
+ if (IS_ERR_OR_NULL(stream))
return;
string_stream_clear(stream);