iio: buffer: Fix NULL pointer deref caused by empty scan mask