diff mbox series

[GIT,PULL] KUnit fixes update for Linux 6.1-rc3

Message ID f2934916-9b69-9603-9ae3-580b0c3eb97d@linuxfoundation.org
State New
Headers show
Series [GIT,PULL] KUnit fixes update for Linux 6.1-rc3 | expand

Pull-request

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.1-rc3

Commit Message

Shuah Khan Oct. 24, 2022, 4:49 p.m. UTC
Hi Linus,

Please pull the following KUnit fixes update for Linux 6.1-rc3.

This KUnit fixes update for Linux 6.1-rc3 consists of 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 IS_ERR().

diff for this pull request is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780:

   Linux 6.1-rc1 (2022-10-16 15:36:24 -0700)

are available in the Git repository at:

   git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.1-rc3

for you to fetch changes up to 618887768bb71f0a475334fa5a4fba7dc98d7ab5:

   kunit: update NULL vs IS_ERR() tests (2022-10-18 15:08:42 -0600)

----------------------------------------------------------------
linux-kselftest-kunit-fixes-6.1-rc3

This KUnit fixes update for Linux 6.1-rc3 consists of 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 IS_ERR().

----------------------------------------------------------------
Dan Carpenter (1):
       kunit: update NULL vs IS_ERR() tests

  lib/kunit/string-stream.c | 4 ++--
  lib/kunit/test.c          | 2 +-
  2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------

Comments

pr-tracker-bot@kernel.org Oct. 24, 2022, 8:06 p.m. UTC | #1
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 mbox series

Patch

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,