diff options
| author | 2020-04-07 18:07:43 +0300 | |
|---|---|---|
| committer | 2020-04-19 16:56:34 +0100 | |
| commit | a17cb784fcd7d54b8bca9792d83e5a7516d73d4e (patch) | |
| tree | fcff5b45ac7531920360618637f6288c5395f77f /include | |
| parent | iio: buffer: remove 'scan_el_attrs' attribute group from buffer struct (diff) | |
| download | linux-dev-a17cb784fcd7d54b8bca9792d83e5a7516d73d4e.tar.xz linux-dev-a17cb784fcd7d54b8bca9792d83e5a7516d73d4e.zip | |
iio: move 'indio_dev->info' null check first in __iio_device_register()
Moves this to be the first check, as it's very simple and fails the
registration earlier, instead of potentially initializing the
'indio_dev->label' and checking for duplicate indexes, and then failing
with this simple-check.
This is a minor optimization, since '__iio_device_register()' will waste
fewer validation cycles in case 'indio_dev->info' is NULL.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
