public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: Be consistent with allocation result tests.
@ 2022-07-18  2:03 Joe Simmons-Talbott
  2022-07-18 16:44 ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Simmons-Talbott @ 2022-07-18  2:03 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, linux-iio, linux-kernel
  Cc: Joe Simmons-Talbott

Make both allocation result tests use the same format

    if (!ptr)

Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
---
 drivers/iio/industrialio-trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index f504ed351b3e..e22c47f20b4d 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -369,7 +369,7 @@ struct iio_poll_func
 	struct iio_poll_func *pf;
 
 	pf = kmalloc(sizeof *pf, GFP_KERNEL);
-	if (pf == NULL)
+	if (!pf)
 		return NULL;
 	va_start(vargs, fmt);
 	pf->name = kvasprintf(GFP_KERNEL, fmt, vargs);
-- 
2.35.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-31 14:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-18  2:03 [PATCH] iio: Be consistent with allocation result tests Joe Simmons-Talbott
2022-07-18 16:44 ` Jonathan Cameron
2022-07-31 14:19   ` Joe Simmons-Talbott

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox