Message ID | f2934916-9b69-9603-9ae3-580b0c3eb97d@linuxfoundation.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 2a91e897c0e199f5d4cdc1a15f948133b15ec1f3 |
Delegated to: | Brendan Higgins |
Headers | show |
Series | [GIT,PULL] KUnit fixes update for Linux 6.1-rc3 | expand |
The pull request you sent on Mon, 24 Oct 2022 10:49:08 -0600:
> git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.1-rc3
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2a91e897c0e199f5d4cdc1a15f948133b15ec1f3
Thank you!
diff --git a/lib/kunit/string-stream.c b/lib/kunit/string-stream.c index f5ae79c37400..a608746020a9 100644 --- a/lib/kunit/string-stream.c +++ b/lib/kunit/string-stream.c @@ -56,8 +56,8 @@ int string_stream_vadd(struct string_stream *stream, frag_container = alloc_string_stream_fragment(stream->test, len, stream->gfp); - if (!frag_container) - return -ENOMEM; + if (IS_ERR(frag_container)) + return PTR_ERR(frag_container); len = vsnprintf(frag_container->fragment, len, fmt, args); spin_lock(&stream->lock); diff --git a/lib/kunit/test.c b/lib/kunit/test.c index 90640a43cf62..2a6992fe7c3e 100644 --- a/lib/kunit/test.c +++ b/lib/kunit/test.c @@ -265,7 +265,7 @@ static void kunit_fail(struct kunit *test, const struct kunit_loc *loc, kunit_set_failure(test); stream = alloc_string_stream(test, GFP_KERNEL); - if (!stream) { + if (IS_ERR(stream)) { WARN(true, "Could not allocate stream to print failed assertion in %s:%d\n", loc->file,