lkml.org 
[lkml]   [2022]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] iio: Be consistent with allocation result tests.
Date
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
\
 
 \ /
  Last update: 2022-07-18 04:04    [W:0.083 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site