iio: Use parens with sizeof
Prefer 'sizeof(var)' over 'sizeof var' as reported by checkpatch.pl. Signed-off-by: Joe Simmons-Talbott <joetalbott@gmail.com> Link: https://lore.kernel.org/r/20220717153438.10800-1-joetalbott@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
3ccb252400
commit
ef7ceceeb1
@ -364,7 +364,7 @@ struct iio_poll_func
|
||||
va_list vargs;
|
||||
struct iio_poll_func *pf;
|
||||
|
||||
pf = kmalloc(sizeof *pf, GFP_KERNEL);
|
||||
pf = kmalloc(sizeof(*pf), GFP_KERNEL);
|
||||
if (pf == NULL)
|
||||
return NULL;
|
||||
va_start(vargs, fmt);
|
||||
@ -553,7 +553,7 @@ struct iio_trigger *viio_trigger_alloc(struct device *parent,
|
||||
struct iio_trigger *trig;
|
||||
int i;
|
||||
|
||||
trig = kzalloc(sizeof *trig, GFP_KERNEL);
|
||||
trig = kzalloc(sizeof(*trig), GFP_KERNEL);
|
||||
if (!trig)
|
||||
return NULL;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user