]> git.baikalelectronics.ru Git - kernel.git/commit
iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check
authorChuhong Yuan <hslester96@gmail.com>
Wed, 3 Jun 2020 09:26:10 +0000 (17:26 +0800)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Jun 2020 10:49:55 +0000 (11:49 +0100)
commitba55b99f36402c8fee303e198b2f26c0b53e0588
tree1e2f57fd2723646b6d94e890ae649be6b92b93cb
parentd07b534841725c2eb5264bc80e8146169e81e483
iio: amplifiers: ad8366: Change devm_gpiod_get() to optional and add the missed check

Since if there is no GPIO, nothing happens, replace devm_gpiod_get()
with devm_gpiod_get_optional().
Also add IS_ERR() to fix the missing-check warning.

Fixes: 613f27d0eb84 ("iio: amplifiers: ad8366: Add support for the ADA4961 DGA")
Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/amplifiers/ad8366.c