iio: Be consistent with allocation result tests.

Make both allocation result tests use the same format

    if (!ptr)

Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com>
Link: https://lore.kernel.org/r/20220718020348.32047-1-joetalbott@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Joe Simmons-Talbott 2022-07-17 22:03:48 -04:00 committed by Jonathan Cameron
parent ef7ceceeb1
commit 295cc4268b

View File

@ -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);