diff options
author | 2022-12-22 09:11:48 +0100 | |
---|---|---|
committer | 2022-12-22 09:11:48 +0100 | |
commit | 2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b (patch) | |
tree | f711bc9cab45f4963e4883ef15ff4c54a6cbc12e /lib/kunit | |
parent | Merge tag 'asoc-fix-v6.1-rc7' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus (diff) | |
parent | ALSA: hda/hdmi: fix stream-id config keep-alive for rt suspend (diff) | |
download | wireguard-linux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.tar.xz wireguard-linux-2d78eb0342dd2c9c5cde9ae9ada1d33f189a858b.zip |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'lib/kunit')
-rw-r--r-- | lib/kunit/string-stream.c | 4 | ||||
-rw-r--r-- | lib/kunit/test.c | 2 |
2 files changed, 3 insertions, 3 deletions
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, |