Merge tag 'linux-kselftest-kunit-fixes-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull KUnit fixes from Shuah Khan: "One single fix to update alloc_string_stream() callers to check for IS_ERR() instead of NULL to be in sync with alloc_string_stream() returning an ERR_PTR()" * tag 'linux-kselftest-kunit-fixes-6.1-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: kunit: update NULL vs IS_ERR() tests
This commit is contained in:
@@ -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);
|
||||
|
||||
+1
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user