diff options
| author | Christophe JAILLET <[email protected]> | 2021-07-14 13:14:51 +0200 |
|---|---|---|
| committer | Jonathan Cameron <[email protected]> | 2021-07-17 17:57:46 +0100 |
| commit | d21fed0675cd190bf35b9c2e3031c6064531734b (patch) | |
| tree | 40f6381b9470ca804dcf4ccd5c17b1eb4e8113a4 /include/linux/debugobjects.h | |
| parent | 458516508df977efd3ff043d5ff77cad2d8f9d64 (diff) | |
iio: buffer: Move a sanity check at the beginning of 'iio_scan_mask_set()'
This is more standard to have sanity checks at the entry of a function,
instead of allocating some memory first and having to free it if a
condition is not met.
Shuffle code a bit to check 'masklength' before calling 'bitmap_alloc()'
Signed-off-by: Christophe JAILLET <[email protected]>
Link: https://lore.kernel.org/r/98a351adda1908c306e981b9cc86d3dbc79eb5ec.1626261211.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Jonathan Cameron <[email protected]>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions