From: Joe Simmons-Talbott Date: Mon, 18 Jul 2022 02:03:48 +0000 (-0400) Subject: iio: Be consistent with allocation result tests. X-Git-Tag: microblaze-v6.1~139^2~4^2~47 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=295cc4268bb946a84f7681a9f032ade09a4087f8;p=linux-2.6-microblaze.git iio: Be consistent with allocation result tests. Make both allocation result tests use the same format if (!ptr) Signed-off-by: Joe Simmons-Talbott Link: https://lore.kernel.org/r/20220718020348.32047-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron --- diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c index 3e1b1fbc66d0..b78814d869b7 100644 --- a/drivers/iio/industrialio-trigger.c +++ b/drivers/iio/industrialio-trigger.c @@ -365,7 +365,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);