iio: buffer: Save a few cycles in 'iio_scan_mask_set()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Wed, 14 Jul 2021 11:14:41 +0000 (13:14 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 17 Jul 2021 16:57:46 +0000 (17:57 +0100)
commit458516508df977efd3ff043d5ff77cad2d8f9d64
tree5ef5d32f6786924cd50fdbe8f895f16b61f5f60b
parent62f9eb7079a91fa19edc14971b38d8737704ef0f
iio: buffer: Save a few cycles in 'iio_scan_mask_set()'

Use 'bitmap_alloc()' instead of 'bitmap_zalloc()' because the bitmap
is fully overridden by a 'bitmap_copy()' call just after its allocation.

While at it, fix the style of a NULL check.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/89d8a766eb971eda1ee362444a8711037bdb208c.1626261211.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/industrialio-buffer.c