Skip to contentSkip to conversation

iio: Be consistent with allocation result tests.

PATCH In review Joe Simmons-Talbott 2 participants 3 messages Jul 18, 2022 – Jul 31, 2022 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: Be consistent with allocation result tests.

Make both allocation result tests use the same format

    if (!ptr)
---
 drivers/iio/industrialio-trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/industrialio-trigger.c +1 -1
index f504ed351b3e..e22c47f20b4d 100644
@@ -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);
Signature · 1 line
2.35.3
maintainer
#1 lore raw
Quoted 5 lines · On Sun, 17 Jul 2022 22:03:48 -0400 Joe Simmons-Talbott <[email protected]>…

Make both allocation result tests use the same format

    if (!ptr)

If you post two patches to the list that will cause each other to not apply, please base one on top of the other and say so in the patch description.

Anyhow, fixed up and applied by hand.

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/industrialio-trigger.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/industrialio-trigger.c +1 -1
index f504ed351b3e..e22c47f20b4d 100644
@@ -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 lore raw
Quoted 5 lines · Jonathan Cameron
Quoted 2 lines · On Sun, 17 Jul 2022 22:03:48 -0400 Joe Simmons-Talbott <[email protected]>…

Make both allocation result tests use the same format

Quoted 8 lines
Quoted 3 lines
    if (!ptr)

If you post two patches to the list that will cause each other to not apply, please base one on top of the other and say so in the patch description.

Anyhow, fixed up and applied by hand.

I'm sorry for neglecting that and for creating extra work. Thank you for fixing it.

Thanks,
Joe