commit | 418ee8e91fe7fc90ffb6bce391304e084f77bce4 | [log] [tgz] |
---|---|---|
author | Bartosz Golaszewski <brgl@bgdev.pl> | Mon Oct 16 11:32:29 2017 +0200 |
committer | Linus Walleij <linus.walleij@linaro.org> | Thu Oct 19 22:32:39 2017 +0200 |
tree | c39b97bc1181c875c04e90187d0140899e4126bf | |
parent | eec1d566cdf94b57e8f5ba9fe60eea214929bcfc [diff] |
gpiolib: only check line handle flags once There's no need to check the validity of handle request flags more than once, right after copying the data from user. Move the check out of the for loop and simplify the error path by bailing out before allocating any resources. Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>