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:
committed by
Jonathan Cameron
parent
ef7ceceeb1
commit
295cc4268b
@ -365,7 +365,7 @@ struct iio_poll_func
|
|||||||
struct iio_poll_func *pf;
|
struct iio_poll_func *pf;
|
||||||
|
|
||||||
pf = kmalloc(sizeof(*pf), GFP_KERNEL);
|
pf = kmalloc(sizeof(*pf), GFP_KERNEL);
|
||||||
if (pf == NULL)
|
if (!pf)
|
||||||
return NULL;
|
return NULL;
|
||||||
va_start(vargs, fmt);
|
va_start(vargs, fmt);
|
||||||
pf->name = kvasprintf(GFP_KERNEL, fmt, vargs);
|
pf->name = kvasprintf(GFP_KERNEL, fmt, vargs);
|
||||||
|
Reference in New Issue
Block a user